Select (recursively) shape files

Share:

Description

Returns the file path to all ‘.shp’ polygons in a directory.

Usage

1
selectShpFiles(dir, ...)

Arguments

dir

character string specifying the directory containing .shp files.

...

currently ignored

Value

Either a data.frame or a character vector is returned.

Note

The function uses getinfo.shape to only select polygon files (aka type 5).

Examples

1
2
3
f = system.file(package="rangeMapper", "extdata", "wrens", "vector")
res = selectShpFiles(f, ogr = TRUE, polygons.only = TRUE)
head(res)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.