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 dplyr release breaks methods for sf objects #304

Closed
mstrimas opened this issue Apr 14, 2017 · 2 comments
Closed

Upcoming dplyr release breaks methods for sf objects #304

mstrimas opened this issue Apr 14, 2017 · 2 comments

Comments

@mstrimas
Copy link

The upcoming dplyr release outlined here overhauls the approach to NSE, and deprecates all the SE verbs (e.g. select_()). With these changes the dplyr verbs for sf objects no longer work. In some cases an error is raised, in others the code runs error free but strips the sf class from the resulting object.

# install development version
devtools::install_github("hadley/dplyr")
library(dplyr)
library(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"), stringsAsFactors = FALSE)
# error
select(nc, AREA)
distinct(nc, SID74)

# strip sf class, converts to normal data frame
mutate(nc, area = AREA * 100) %>% class()
group_by(nc, SID74) %>% class()
filter(nc, AREA > 0.2) %>% class()
@edzer
Copy link
Member

edzer commented Apr 14, 2017

Premature excitement IMO, see my answer at #42.

@edzer edzer closed this as completed Apr 14, 2017
@mstrimas
Copy link
Author

@hadley possible backwards compatibility issue for SE dplyr verbs here

edzer added a commit that referenced this issue Apr 18, 2017
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

2 participants