subset.rspec | R Documentation |
Subsets various object types based on a given vector or grep partial matching of data names.
## S3 method for class 'rspec'
subset(x, subset, ...)
## S3 method for class 'colspace'
subset(x, subset, ...)
## S3 method for class 'vismodel'
subset(x, subset, ...)
x |
(required) an object of class |
subset |
a string used for partial matching of observations. |
... |
additional attributes passed to |
a subsetted object of the same class as the input object.
if more than one value is given to subset
, any spectra that
matches either condition will be included. It's a union, not an
intersect.
Chad Eliason cme16@zips.uakron.edu
data(sicalis)
vis.sicalis <- vismodel(sicalis)
tcs.sicalis <- colspace(vis.sicalis, space = "tcs")
# Subset all 'crown' patches (C in file names)
head(subset(sicalis, "C"))
head(subset(sicalis, c("B", "C")))
head(subset(sicalis, "T", invert = TRUE))
subset(vis.sicalis, "C")
subset(tcs.sicalis, "C")[, seq_len(5)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.