Subset rspec, vismodel, and colspace objects

Share:

Description

Subsets various object types based on a given vector or grep partial matching of data names.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'rspec'
subset(x, subset, ...)

## S3 method for class 'colspace'
subset(x, subset, ...)

## S3 method for class 'vismodel'
subset(x, subset, ...)

Arguments

x

(required) an object of class rspec, vismodel, or colspace, containing spectra, visual model output or colorspace data to subset.

subset

a string used for partial matching of observations.

...

class consistency (ignored).

Value

a subsetted object of the same class as the input object.

Author(s)

Chad Eliason cme16@zips.uakron.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
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"))
subset(vis.sicalis, "C")
subset(tcs.sicalis, "C")[, 1:5]

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.