iobis / obistools

Tools for data enhancement and quality control
https://iobis.github.io/obistools
Other
25 stars 6 forks source link

error on check_onland function #87

Open savvas-paragkamian opened 2 years ago

savvas-paragkamian commented 2 years ago

When running the check_onland function I got this error from R:

Error in which(as.vector(shoredistances) < (-1 * buffer)) : 'list' object cannot be coerced to type 'double' I used this dataset with the following command check_onland(case_study_event, offline=F) I have the latest version of the package.

it turns out this error occurs in line 53 https://github.com/iobis/obistools/blob/d039b4bb23dd130372dd34585a23f800934750c1/R/check_onland.R#L53

By changing the line to : i <- which(as.vector(unlist(shoredistances)) < (-1*buffer)) the error is resolved. I checked the output and the number of occurrences that are on land are the same with the OBIS summary and the package output.

Greetings, Savvas