ropensci / CoordinateCleaner

Automated flagging of common spatial and temporal errors in biological and palaeontological collection data, for the use in conservation, ecology and palaeontology.

Home Page:https://docs.ropensci.org/CoordinateCleaner/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in outlier test in clean_coordinates()

damariszurell opened this issue · comments

Hi there,
It seems this issue has been reported before, but still causes troubles.

Specifically, the outlier test in clean_coordinates() throws an error while cc_outl() works alright.


SessionInfo: R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.5

other attached packages:
CoordinateCleaner_2.0-15
rgbif_3.2.0


Example code

library(rgbif)
gbif_shrew <- occ_search(scientificName = "Sorex alpinus")$data

library(CoordinateCleaner)
gbif_shrew <- subset(gbif_shrew, !is.na(decimalLatitude))
clean_coordinates(gbif_shrew, lon="decimalLongitude", lat="decimalLatitude", tests="outliers")

produces the following error:
image

# This works alright:
cc_outl(gbif_shrew, lon="decimalLongitude", lat="decimalLatitude")

Hi!
Hm this works for me under CoordinateCleaner v2.0-16. Since you use v2.0-15, could you try to install the latest version, and report if the problem persists?

library(devtools)
install_github("ropensci/CoordinateCleaner")

Thanks!

Thanks, it works fine with CoordinateCleaner v2.0-16 !