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

the dplyr multi mutate thing #3

Open
mdsumner opened this issue Aug 19, 2016 · 2 comments
Open

the dplyr multi mutate thing #3

mdsumner opened this issue Aug 19, 2016 · 2 comments

Comments

@mdsumner
Copy link
Member

https://gist.github.com/mdsumner/c8ea384fdeca3ff48c5f5c2c192e5ee5

Hadley "it's in my brain" Wickham: https://twitter.com/hadleywickham/status/766623940080828416

@mdsumner
Copy link
Member Author

I just use

x[c("x", "y")] <- op(cbind(x, y)) 

that seems as handy as any other

@mdsumner
Copy link
Member Author

mdsumner commented Jun 1, 2021

Resurrect this and do like

reproj_df <- function(x, y, crs, ...) {xy <- reproj::reproj(tibble(x = x, y = y), crs, ...); tibble::tibble(x = xy[,1], y = xy[,2])}
tibble(a = "b", x = 1, y = 2) %>% mutate(a, reproj_df(x, y, "+proj=laea", source = 4326))

that would be good, need to preserver the names of the inputs ...

@mdsumner mdsumner reopened this Jun 1, 2021
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