# Example 1: Exclude observations on juvenile plants or unknown state:
# Identify observations where the plant developmental status (DataID 413) is either
# "juvenile" or "unknown", and exclude the whole observation
data_filtered <- rtry_exclude(data_TRY_15160,
(DataID %in% 413) & (OrigValueStr %in% c("juvenile", "unknown")),
baseOn = ObservationID)
# Expected message:
# dim: 1618 28
# Example 2: Exclude outliers:
# Identify the outliers, i.e. trait records where the ErrorRisk is larger than 4
# and exclude these records (not the whole observation)
data_filtered <- rtry_exclude(data_TRY_15160,
ErrorRisk > 4,
baseOn = ObsDataID)
# Expected message:
# dim: 1778 28
# Learn more applications of the excluding function via the vignette (Workflow for
# general data preprocessing using rtry): vignette("rtry-workflow-general").
Run the code above in your browser using DataLab