You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, clean_coordinates works OK with the defaults, but it fails if we change zeros_rad to 0, i.e. if we want to remove records only if they have exactly 0 lon / lat:
exmpl <- data.frame(species = sample(letters, size = 250, replace = TRUE),
decimallongitude = runif(250, min = 42, max = 51),
decimallatitude = runif(250, min = -26, max = -11))
test <- clean_coordinates(x = exmpl, tests = "zeros", zeros_rad = 0)
# Testing coordinate validity
# Flagged 0 records.
# Testing zero coordinates
# Error in (function (classes, fdef, mtable) :
# unable to find an inherited method for function ‘over’ for signature ‘"SpatialPoints", "NULL"’
If this is purposeful or difficult to fix, at least it should be mentioned in the description of this argument in the help file, so that users are not not puzzled by the error. Or you could add a line inside the function to turn zeros_rad to a very small value if the user has set it to 0 -- something like: if (zeros_rad == 0) zeros_rad <- 0.000000000000001
Cheers!
The text was updated successfully, but these errors were encountered:
Hello,
clean_coordinates
works OK with the defaults, but it fails if we changezeros_rad
to 0, i.e. if we want to remove records only if they have exactly 0 lon / lat:If this is purposeful or difficult to fix, at least it should be mentioned in the description of this argument in the help file, so that users are not not puzzled by the error. Or you could add a line inside the function to turn
zeros_rad
to a very small value if the user has set it to 0 -- something like:if (zeros_rad == 0) zeros_rad <- 0.000000000000001
Cheers!
The text was updated successfully, but these errors were encountered: