Join the DZone community and get the full member experience.
Join For Free
Hortonworks DataFlow is an integrated platform that makes data ingestion fast, easy, and secure. Download the white paper now. Brought to you in partnership with Hortonworks.
Here is a quick tip on how to load multiple shapefiles (i.e., point shapefiles) to the R console in one go:
# get all files with the .shp extension from working directory
shps <- dir(getwd(), "*.shp")
# the assign function will take the string representing shp and turn it into a variable
# which holds the spatial points data
for (shp in shps) assign(shp, readShapePoints(shp))
plot(get(shp)) # i.e.
Hortonworks Sandbox is a personal, portable Apache Hadoop® environment that comes with dozens of interactive Hadoop and it's ecosystem tutorials and the most exciting developments from the latest HDP distribution, brought to you in partnership with Hortonworks.
Published at DZone with permission of
, DZone MVB
Opinions expressed by DZone contributors are their own.