SpGeoCod: Point to Polygon Classification

View source: R/SpGeoCod.R

SpGeoCodR Documentation

Point to Polygon Classification

Description

Classifying point occurrences to polygons for the use in phylogenetic analysis.

Usage

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

Arguments

x

a data.frame with three columns named: species, decimallongitude, decimallatitude OR a character string with the path to a text file containing the coordinates of points of interest (tab delimited, three columns with header: species, decimallongitude, decimallatitude) OR a character string giving species names, to download from GBIF.

y

an SpatialPolygonsDataframe OR a character string with the path to a shape file containing the polygons of interest OR the path to a text file containing the polygons of interest (tab delimited, three columns with header: species, decimallongitude, decimallatitude) OR an object of the class SpatialPolygons .

areanames

a character string. If y is a SpatialPolygonsDataFrame or the path to a shape file, this column indicates the column with the area names. 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.

Value

An object of the class spgeoOUT.

Note

See https://github.com/azizka/speciesgeocodeR/wiki for more details and tutorials.

Examples

data(lemurs)
data(mdg_biomes)

outp <- SpGeoCod(lemurs, mdg_biomes, areanames = "name")

azizka/speciesgeocodeR documentation built on Sept. 5, 2023, 3:45 a.m.