Learn R Programming

speciesgeocodeR (version 1.0-4)

ReadPoints: Loading Data into SpeciesgeocodeR

Description

Create an object of the class spgeoIN from the input arguments.

Usage

ReadPoints(x, y, areanames = NA, verbose = FALSE, cleaning = FALSE)

Arguments

x
a data.frame with three columns named identifier, XCOOR, YCOOR or a character string. If x is a character string, it can either be the path to a tab-delimited text file containing the coordinates of points of interest (tab delimited, three columns with header: identifier, XCOOR, YCOOR) OR a vector of species names. In the latter cases GBIF is searched for occurrence data using the rgbif function of the rgbif package.
y
character string giving the path to a text file containing the polygons of points of interest (tab delimited, three columns with header: identifier, XCOOR, YCOOR) OR an object of the class SpatialPolygons OR an object of the class SpatialPolygonsDataFrame.
areanames
character string. If the polygons in the spgeoIN object were derived from a shape file or a SpatialPolygonsDataframe, this column indicates the name of the column used for area names. See the Speciesgeocoder tutorial for more information. If the polygons in the spgeoIN object were derived from a text file leave as default (Default = NA).
verbose
logical. If TRUE, the functions report the progress of the analyses. This is advisable for large datasets.
cleaning
logical. If TRUE, GeoClean is applied to the input coordinates. Default = FALSE.
...
Further arguments to be passed to GeoClean.

Value

An object of class spgeoIN.

See Also

lemurs_in

Examples

Run this code
data(lemurs)
data(mdg_poly)

inp <- ReadPoints(lemurs, mdg_poly)

Run the code above in your browser using DataLab