read_shp: Import ESRI shapefiles into R

Description Usage Arguments Author(s)

Description

Import shapefile into an R spatial polygons object. Useful for plotting within the leaflet package, or for downstream use to convert into a series of lat/lon coordinates.

Usage

1
read_shp(baseDir = getwd(), folderName = NULL, layerName)

Arguments

baseDir

string containing the name of the base directotry containing the shapefile

folderName

(optional) string containing the name of the folder within baseDir containing the shapefile. Not required if baseDir contains the full name of the folder containing the shapefile

layerName

string containing the name of the shapefile, e.g. 'district_boundary' for 'district_boundary.shp'. Should not include '.shp'

Author(s)

Laura Hughes, laura.d.hughes@gmail.com


flaneuse/frontier documentation built on May 16, 2019, 1:17 p.m.