Learn R Programming

rangeMapper (version 0.0-4)

selectShpFiles: Select (recursively) .shp files

Description

Returns the file path to all .shp files in a directory.

Usage

selectShpFiles(dir, ogr = TRUE, polygons.only = TRUE)

Arguments

dir
character string specifying the directory containing .shp files.
ogr
A logical value. If TRUE a data.frame with two columns (dsn and layer) is returned. If FALSE a character vector containing the names o
polygons.only
A logical value. If TRUE only polygon file paths are returned. If FALSE the location of all shape files is returned.

Examples

Run this code
f= system.file(package="rangeMapper", "extdata", "wrens", "vector")
selectShpFiles(f, ogr = FALSE, polygons.only = TRUE)

Run the code above in your browser using DataLab