-
Notifications
You must be signed in to change notification settings - Fork 292
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
obscure error with indexing st_geometry on tibble #391
Comments
|
@edzer sorry about that. Fixed example above. |
This is a nested replacement function; I'm afraid this is never going to work. A similar example from base R, which also doesn't work, is this: df = data.frame(a = 3, id = 1)
row.names(df[1,]) = "a"
row.names(df)
# [1] "1"
row.names(df[1,])
# [1] "1" I'll try to find out why the object returned is invalid - that shouldn't happen. |
No problem and thanks. I just thought it strange that all cases worked except the one. Thanks again! |
Sure; I'll keep it open until I'm convinced it doesn't reveal a problem in sf. |
I hesitated to even file this issue as it seems to be an obscure edge case, but in the interest of robustness of
sf
I elected to file. Feel free to close if too obscure. I discovered researching r-spatial/mapedit#32.generalized issue
Probably easier to understand below as a reproducible example. The error only happens with assignment using
st_geometry(my_sf[####,])
on asf tibble
object with a column that is after thegeometry
column.reproducible example
Everything works exactly as I would expect except the one commented case below.
The text was updated successfully, but these errors were encountered: