Reading and writing of "ESRI shapefile" format spatial data. Only the three vector types (points, lines, and polygons) can be stored in shapefiles.
These are simple wrapper functions around readOGR and writeOGR (rgdal package).
Usage
## S3 method for class 'character':
shapefile(x, stringsAsFactors=FALSE, verbose=FALSE, ...)
## S3 method for class 'Spatial':
shapefile(x, filename='', overwrite=FALSE, ...)
Arguments
x
character (a file name, when reading a shapefile) or Spatial* object (when writing a shapefile)
filename
character. Filename to write a shapefile
overwrite
Logical. Overwrite existing shapefile?
verbose
Logical. If TRUE, information about the file is printed
stringsAsFactors
Logical. If TRUE, strings are converted to factors
...
Additional arguments passed to rgdal functions readOGR or writeOGR
Value
Spatial*DataFrame (reading). Nothing is returned when writing a shapefile.