removeObs: Remove observations belonging to the shortest ("worst")...

Description Usage Arguments Details Value Note Examples

View source: R/removeObservations.R

Description

This function removes observations based on the visits effort or quality. Visit effort or quality could be given most often by species list length (that is, the number of species observed during the visit, SLL). However, in some cases there could be only one or few species observed but in great numbers each and spread across a big surveyed area. The effort then may not be small. If the user may find it necessary to remove those observations belonging to visits with an effort lower than a threshold, or a certain percentage of the "worst" observations, then this function will help.

Usage

1
2
3
4
5
6
7
8
removeObs(
  x,
  ev,
  criteria = "SLL",
  percent = 75,
  minCrit = NULL,
  stepChunk = 0.05
)

Arguments

x

an object of class ‘OrganizedBirds’ (organised BIRDS Spatial data.frame). See organizeBirds

ev

an object of class ‘data.frame’ from exploreVisits.

criteria

the criteria to rank "good visits". Accepts c("SLL", "nObs", "effortDiam", "medianDist")

percent

the percentage (i.e. 0 - 100) of observation to keep, or NULL. (default = 75)

minCrit

the minimum accepted of a given criteria in the data set (default = NULL).

stepChunk

if the search for observations includes too many in a given quality stage, the search takes progressively smaller fractions of the dataset in steps. This argument controls for how small fractions are discarded on each step. If stepChunk = 0.05 (default) means that in the first step 95 the observations will be tested, then 95 adequate number of observations are obtained. Increase this argument if you see the function takes too long.

Details

Please note: this function removes all observations belonging to visits that fulfil the criteria. Also, the percentage of "lower quality" visits in the sample is not necessarily the same as the the percentage of "lower quality" observations. The removal of observations is done stepwise by quantile therefore you may get a lower percentage than the aimed given than all remaining visits are too large to be included completely. This may happen particularly with smaller datasets.

Value

An updated OrganisedBirds dataset

Note

If both 'percent' and 'minCrit' are defined then 'percent' prevails.

Examples

1
2
3
OB <- organizeBirds(bombusObs, sppCol = "scientificName", simplifySppName = TRUE)
EV <- exploreVisits(OB)
OBshorter <- removeObs(OB, EV, percent = 75)

BIRDS documentation built on June 27, 2021, 1:06 a.m.