occFilter: Filter occurrence records from occTest outputs

occFilterR Documentation

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
)

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'))

Details

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

Value

list of 2 data.frames

Author(s)

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

See Also

showTests

Examples


### 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)


occTest documentation built on Nov. 18, 2022, 5:07 p.m.