ropensci/togeojson — pull request #13 by ateucher (2014-10-29 17:06:55+00:00)
Title: Adding geojson_write methods for SpatialLines, SpatialLinesPolygons and SpatialPoints

Required adding `as.Spatial*DataFrame` methods for `SpatialLines` and `SpatialPoints` classes (implemented in `as_spatialdf.R`).

`sp` package has as.SpatialPolygonsDataFrame.SpatialPolygons, but not for lines and points. I used the same style as in `sp` (lines 189:196 here: https://github.com/cran/sp/blob/6caf3da78c9da32129a0f83b339ff2591e0945a0/R/SpatialPolygons-methods.R). In my testing it seems to work, but a bit more testing would be appreciated.