Constructs a new ftmsData object that is a subset of the original
with only the specified samples or group. Exactly one of samples
or group
must be specified.
# S3 method for peakData
subset(x, samples = NA, groups = NA, check_rows = FALSE, ...)
# S3 method for compoundData
subset(x, samples = NA, groups = NA, check_rows = FALSE, ...)
# S3 method for reactionData
subset(x, samples = NA, groups = NA, check_rows = FALSE, ...)
# S3 method for moduleData
subset(x, samples = NA, groups = NA, check_rows = FALSE, ...)
ftmsData object
sample ID or vector of sample IDs
group name or vector of group names
logical indicating whether to remove peaks that have no observations after subsetting
other arguments
ftmsData object that contains only the subset of the original data related to the samples or groups provided