Learn R Programming

gecko (version 1.0.2)

outliers.visualize: Visual detection of outliers.

Description

Draws plots of sites in geographical (longlat) and environmental (2-axis PCA) space.

Usage

outliers.visualize(longlat, layers)

Value

data.frame. Contains coordinate values and distance to centroid in pca. Two plots are drawn for visual inspection. The environmental plot includes row numbers for easy identification of possible outliers.

Arguments

longlat

matrix. Matrix of longitude and latitude or eastness and northness (two columns in this order) of species occurrence records.

layers

SpatRaster. As defined in package terra, see terra::rast(). It can be any set of environmental layers thought to allow the identification of environmental outliers.

Details

Erroneous data sources or errors in transcriptions may introduce outliers that can be easily detected by looking at simple graphs of geographical or environmental space.

Examples

Run this code
localities = gecko.data("records")
localities = localities[localities$species == "Hogna maderiana", 2:3]
region = gecko.data("layers")
outliers.visualize(localities, region[[1:3]])

Run the code above in your browser using DataLab