biometry / bipartite

repository for the bipartite R-package for network analysis
36 stars 17 forks source link

Bug in function "robustness" #5

Closed hanlunliu closed 4 years ago

hanlunliu commented 4 years ago

Dear Carsten,

There is a bug in function "robustness" of bipartite 2.14. These are the first two lines of its code: if (is(object, "bipartite")) stop("This function cannot be meaningfully applied to objects of this class.")

It should be ' if (!is(object, "bipartite")) ' since function "second.extinct" returns object in class "bipartite". Please have a check.

Best,

Hanlun

nefff1 commented 4 years ago

Yes, same problem here. Best, Felix

cdormann commented 4 years ago

You're absolutely right! This was a bug I introduced in the previous version when CRAN required the discontinuation of the "class" approach. I'll push a correction to github immediately. Thanks for letting me know!

hanlunliu commented 4 years ago

Thanks very much!