Learn R Programming

speciesgeocodeR (version 1.0-4)

SpGeoCod: Point to Polygon Classification from Text Files

Description

Wrapper around ReadPoints and SpGeoCodH, runs a complete speciesgeocodeR occurrences to area classification analysis from text files as input.

Usage

SpGeoCod(x, y, areanames, occ.thresh = 0, elevation, threshold, cleaning = FALSE, ...)

Arguments

x
a character string giving the path to a text file containing the coordinates of points of interest (tab delimited, three columns with header: identifier, XCOOR, YCOOR) OR a data.frame with three columns named: identifier, XCOOR, YCOOR.
y
a character string giving the path to a shape file containing the polygons of interet OR a text file containing the polygons 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
a character string. If the input polygon file is a shape and not a text file, this column indicates the name of the column used for area names. See the SpeciesgeocodeR tutorial for more information, if the polygon input file is a text file leave as default (Default = "").
occ.thresh
numerical. Threshold for the minimum number of occurrences necessary in a polygon to be counted as present (in percent of the total occurrences of the species). Default = 0.
elevation
logical. Should the results be split by elevation class? (default = FALSE)
threshold
numeric vector. Indicating the elevation thresholds.
cleaning
logical. If TRUE, GeoClean is applied to the input coordinates.
...
Further arguments to be passed to GeoClean.

Value

An object of the class spgeoOUT.

See Also

ReadPoints, SpGeoCodH.

Examples

Run this code
data(lemurs)
data(mdg_poly)

outp <- SpGeoCod(lemurs, mdg_poly)

Run the code above in your browser using DataLab