rtry_select_row {rtry} | R Documentation |
Select rows
Description
This function selects rows based on specified criteria
and the corresponding ObservationID
from the imported data for further processing.
Usage
rtry_select_row(
input,
...,
getAncillary = FALSE,
rmDuplicates = FALSE,
showOverview = TRUE
)
Arguments
input |
Input data frame or data table. |
... |
Criteria for row selection. |
getAncillary |
Default |
rmDuplicates |
Default |
showOverview |
Default |
Value
An object of the same type as the input data.
Note
This function by default filters data based on the unique identifier ObservationID
listed in the TRY data, therefore, if the column ObservationID
has been removed,
this function will not work.
References
This function makes use of the unique
and subset
functions
within the base
package. It also uses the function rtry_remove_dup
.
Examples
# Within the provided sample data (data_TRY_15160) select the georeferenced traits
# records together with records for Latitude and Longitude (DataID 59 and 60) and
# exclude duplicate trait records
data_selected <- rtry_select_row(data_TRY_15160,
(TraitID > 0) | (DataID %in% c(59, 60)),
getAncillary = TRUE,
rmDuplicates = TRUE)
# Expected message:
# 45 duplicates removed.
# dim: 1737 28