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, ...)

Arguments

x

ftmsData object

samples

sample ID or vector of sample IDs

groups

group name or vector of group names

check_rows

logical indicating whether to remove peaks that have no observations after subsetting

...

other arguments

Value

ftmsData object that contains only the subset of the original data related to the samples or groups provided