Learn R Programming

occTest (version 0.1.1)

occSimpFilter: Runs tests and validates data

Description

Runs tests and validates data

Usage

occSimpFilter(
  spOcc,
  env,
  speciesName = "My species",
  x = "x",
  y = "y",
  date = NULL,
  isoCountry = NULL,
  classification = "majority",
  filterCols = TRUE
)

Value

a list of two. First element is a data.frame with profiled occurrence records with their associated profiled labels. Second element is a dataframe with all outputs of the analysis implemented.

Arguments

spOcc

data.frame. Object with the coordinate data.

env

raster or rasterStack. Environmental data (e.g. typically climatic).

speciesName

character. Name of the species.

x

name of the field with the coordinate x. Default 'x'

y

name of the field with the coordinate y. Default 'y'

date

name of the field with the values of the reported timestamp of the record. Default NULL

isoCountry

name of the field with the values of the reported country of the record. Default NULL

classification

character. Indicates the thresholds philosophy applied to classify errors in occurrence data. Possible values 'strict','relaxed','custom'

filterCols

logical. Should only the initial input columns be retained in the output (the filtered dataframe)?

Author

Josep M Serra-Diaz (pep.serradiaz@agroparistech.fr)

Examples

Run this code
# \donttest{
### THIS IS A CUT DOWN  EXAMPLE 
### visit vignetteXtra-occTest for more info
#load environmental raster
library (raster)
library (sf)
library (occTest)
#load occurrence data
occData <- read.csv (system.file('ext/exampleOccData.csv',package = 'occTest'))
#load environmental raster
renv <- raster (system.file('ext/AllEnv.tif',package = 'occTest'))
#load elevation raster
dem <- raster (system.file('ext/DEM.tif',package = 'occTest'))
#load settings
settings <- readRDS (system.file('ext/exSettings.rds',package = 'occTest'))
#run occTest
out = occTest(sp.name='MyFake species',
             sp.table = occData,ntv.ctry = 'ESP',inv.ctry = 'FRA',
             tableSettings = settings$tableSettings,
             writeoutSettings = settings$writeoutSettings,
             analysisSettings = settings$analysisSettings,
             r.env = renv,r.dem=dem)
#filter
occFilter(out)
# }

Run the code above in your browser using DataLab