You can subset sample_sets by identifier or by position using
the `[`
operator.
# S4 method for sample_sets,missing,missing,missing
[(x, i, j, ..., drop = FALSE)# S4 method for sample_sets,numeric,missing,missing
[(x, i, j, ..., drop = FALSE)
# S4 method for sample_sets,character,missing,missing
[(x, i, j, ..., drop = FALSE)
A sample_sets object.
A sample_sets object.
Position of the identifier or the name of the identifier itself.
Not used.
Additional arguments not used here.
Not used.
if (FALSE) { # interactive()
# Get a few sample sets:
my_pss <- get_sample_sets(sprintf('PSS%06d', 42:48))
#
# Subsetting by position
#
my_pss[c(1, 3)]
#
# Subsetting by sample set identifier (character)
#
my_pss['PSS000042']
}
Run the code above in your browser using DataLab