Closed vincenzocoia closed 4 months ago
These are not features, rows, but fields, columns. rlang
syntax is superfluous for most users.
The cost of this would be to elevate rlang
from a suggested to a required dependency, because without doing that you can forget the majority of the tests, making the tests meaningless when running without suggested packages.
Since you're on the tidy track, why not use
st_sf(tibble(x, !!!f))
?
st_sf(tibble(x, !!!f))
Great solution, thanks!
Hello, I'd like to use the big bang (
!!!
) operator with the functionst_sf()
as a way of adding features to a spatial object, and thought others might, too. Normally, therlang::exec()
function is a nice workaround, but this gives undesirable results. See below for my use case, a demo of the problem, and a proposed solution. I'm happy to submit a pull request if that's preferable.Why
The big bang would be useful for the function I'm writing, where features are input as a list (the
...
is being used for something else).Reproducible example of the issue
Make a sfc object
Add features the usual way
Add features with the big bang: doesn't work.
Use rlang's
exec()
to allow the big bang: attributes have awful namesCreated on 2024-07-10 with reprex v2.1.0
Proposed Solution
You could change the first line of the source of
st_sf
fromto
You could even keep rlang under
Suggests
with a bit more code.