Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize birds problem with sf objetcs #37

Open
SphagnumPI opened this issue Feb 8, 2023 · 0 comments
Open

Organize birds problem with sf objetcs #37

SphagnumPI opened this issue Feb 8, 2023 · 0 comments

Comments

@SphagnumPI
Copy link

The function organiseBirds will not organise an sf object.

Error is:
"Error in organiseBirds(dat, sppCol = "vetenskapligt_namn", idCols = c("lokal", :
The column names defined for the coordinates could not be found in the data set"

I think the reason is that at line 520
the function calls:
if (any(class(x) == "data.frame"))

an sf object gives a response of
"sf" "data.frame"
so is assumed to not be spatial by default as the code is now

possible solution would be
all( any( class(x)%in%"sf"), any( class(x) %in% "data.frame"))

Charlie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant