u_shpsplitR: A tool for splitting ESRI shape files.

Description Usage Arguments Value Author(s) Examples

View source: R/RSSA_utils.R

Description

u_shpsplitR takes an ESRI shape file and splits it into multiple shape files based on unique entries in a field of the attribute table.

Usage

1
u_shpsplitR(pathin, pathout = paste0(pathin, "/site_vectors"), layer, attrb)

Arguments

pathin

Character string filepath to the location of the shape file.

pathout

Character string filepath to the write location.

layer

Character string of the name of the shape file (no extension).

attrb

Character string of the name of the field in the attribute table of the shape file that contains the unique entries (e.g.site numbers).

Value

Creates multiple ESRI shape files each named after the unique entry found in 'attrb' and saves them to a folder (defaults to "site_vectors"). It will also write a text file with the name of the original layer file used and output names of new layers created to screen or to object if created.

Author(s)

Bart Huntley, [email protected]

Examples

1
2
3
4
## Not run: 
u_shpsplitR(layer = "plot_locations", attrb = "Plot_ID")

## End(Not run)

RSPaW/RSSApkg documentation built on May 31, 2018, 5:23 p.m.