findSpatialOutliers: Find outlying occurrence data in geographic space

View source: R/spatial.r

findSpatialOutliersR Documentation

Find outlying occurrence data in geographic space

Description

Spatial outliers

Usage

findSpatialOutliers(
  pres,
  pvalSet = 1e-05,
  method = "grubbs",
  checkPairs = TRUE,
  kRosner = NULL
)

Arguments

pres

a 'SpatialPoints' or 'SpatialPointsDataFrame' object describing the locations of species records. A 'SpatialPointsDataFrame' containing the values of environmental variables to be used must be supplied if 'envOutliers=TRUE'

pvalSet

user-specified p-value for assessing the significance of Grubbs test statistic.

method

character; options are 'iqr', 'grubbs', 'dixon', 'rosner'

checkPairs

logical; check for a single pair of outliers using the Grubbs test. This can only be performed for sample sizes <30. Only a single test is used because repeating it tends to throw out more points than seem reasonable, by eye. The value has no effect unless ‘method=’grubbs''.

kRosner

integer between 1 and 10. Determines the number of outliers suspected with a Rosner test. The value has no effect unless ‘method=’rosner''.

Details

See Examples.

Value

Returns the indices of spatial outliers

Author(s)

Cory Merow <cory.merow@gmail.com>

Examples

myPres=read.csv(system.file('extdata/SpeciesCSVs/Camissonia_tanacetifolia.csv',
                            package='occOutliers'))
myPres=myPres[complete.cases(myPres),]
sp::coordinates(myPres)=c(1,2)
presOut=findSpatialOutliers(pres=myPres, pvalSet=1e-5)


cmerow/occOutliers documentation built on July 8, 2023, 8:04 a.m.