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.
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.
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 commandcheck_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