Created
April 20, 2017 20:50
-
-
Save zross/c804d3e3b9f6cbde0e5b63f7816400f1 to your computer and use it in GitHub Desktop.
quick example of sf with dplyr producing spatial output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
nc = st_read(system.file("shape/nc.shp", package="sf")) | |
nc$blah <- sample(c(1,2,3), size = nrow(nc), replace = TRUE) | |
nc %>% group_by(blah) %>% summarize(avg_bir74 = mean(BIR74)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment