Problems with clean_coordinates()
pablosanchezmart opened this issue · comments
Hello,
I have some problems when I run clean_coordinates(). More concretely, when I set "outliers" and "urban". With "outliers" I have the following error:
Error in ras_dist(x = k, lat = lat, lon = lon, ras = ras, weights = TRUE)
And with "urban" the following one:
error in .rownamesdf<-
(x, value = value) : invalid 'row.names' length
I am working with the last R version and the las version of the package and my coordinates database seems to be ok, so there may be something wrong with the code?
I would appreaciate some help here, as I really want to use this extremely useful package.
Thanks a lot,
Pablo
OK. Could you provide some example data to reproduce the error? Thanks!
Hi, finally I've manage to do it. Instead of including the outliers cleaning into the clean_coorinates() function I am doing it separately, as it follows:
#Clean coordinates
clean <- clean_coordinates(x = occ.df, lon = "longitude", lat = "latitude",
species = "species",
tests = c("capitals", "duplicates","equal","gbif", "institutions", "seas", "zeros"), value = c("clean"), verbose = F)
clean.outl<- cc_outl(clean, lon = "longitude", lat = "latitude", species = "species", method = "quantile", value = "clean")
Thanks!
Pablo