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

upcoming sf breaks opensensemapR #31

Open
edzer opened this issue Dec 18, 2023 · 1 comment
Open

upcoming sf breaks opensensemapR #31

edzer opened this issue Dec 18, 2023 · 1 comment

Comments

@edzer
Copy link

edzer commented Dec 18, 2023

an improvement to sf revealed a coding error in opensensmapR, and breaks the vignette building. If you run osem-intro.Rmd up to line 147, and then do

> st_as_sf(pm25) |> names()
# [1] NA    NA    NA    NA    NA    NA    "NA."

you see that the column names vanished. This now breaks because the geometry column name is set to geometry and passed on to sf_sf() where it needs to be found (but isn't). The error comes from
https://github.com/sensebox/opensensmapR/blob/master/R/external_generics.R#L27
where mostattributes<- fails to set names when columns are deselected:

pm25[-c(3,4)] |> head()
# NULL
@edzer
Copy link
Author

edzer commented Dec 18, 2023

Let me know if you need help fixing this one.

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