Learn R Programming

occTest (version 0.1.1)

occFilter: Filter occurrence records from occTest outputs

Description

Select occurrence records based on aggregated values of different tests

Usage

occFilter(
  df,
  by = "testBlock",
  errorAcceptance = "relaxed",
  errorThreshold = NULL,
  custom = NULL
)

Value

list of 2 data.frames

Arguments

df

data.frame. Output of occTest

by

character. Applying thresholds to either blocks of test ('testBlock') or single test types ('testType')

errorAcceptance

character. Philosophy for filtering based on threshold. Option are majority, relaxed, strict. Default are 'relaxed'

errorThreshold

double. Value from 0 to 1, specifying the threshold of wrong tests (potentally erroneous records) to filter. It overrides the parameters in thresholds. We recommend building that table based on the functio buildCustomThresholds.

custom

data.frame or equivalent, custom rules created adding a "errorThreshold" (ranging from 0, strict, to 1, relaxed) column to to the result of readRDS(system.file('ext/fieldMetadata.rds',package='occTest'))

Author

Josep M Serra-Diaz (pep.serradiaz@agroparistech.fr), Jeremy Borderieux (jeremy.borderieux@agroparistech.fr)

Details

If errorAcceptance is used, a 'relaxed' philosophy corresponds to 0.7 (70

See Also

showTests

Examples

Run this code

### THIS IS A CUT DOWN  EXAMPLE 
### visit vignetteXtra-occTest for more info

#load output from occTest
occTest_output <- readRDS (system.file('ext/out.rds',package = 'occTest'))
filtered_dataset <- occFilter (occTest_output)
#inspect results
names (filtered_dataset)

Run the code above in your browser using DataLab