spdplyr
provides methods for the dplyr
verbs for the Spatial
classes in the sp
package.
Install from CRAN:
install.packages("spdplyr")
The development version of spdplyr
can be installed directly from Github:
devtools::install_github("mdsumner/spdplyr")
Apply dplyr
verbs to the attribute data of sp
objects with dplyr verbs.
See ?dplyr-Spatial'
for supported verbs.
Most of it is easy, simply applying the analogous operation of the verb to the Spatial*DataFrame and subsetting/re-organizing as necessary. Some operations use the spbabel::sptable
approach which provides a loss-less way to do what ggplot2::fortify
does and its reverse.
NOTE: joins aren't really thought through or developed properly, send me your feedback / ideas / help!