photobiology (version 0.9.30)

Subset: Subsetting spectra

Description

Return subsets of spectra stored in class generic_spct or derived from it.

Usage

# S3 method for generic_spct
subset(x, subset, select, drop = FALSE, ...)

Arguments

x

object to be subsetted.

subset

logical expression indicating elements or rows to keep: missing values are taken as false.

select

expression, indicating columns to select from a spectrum.

drop

passed on to [ indexing operator.

...

further arguments to be passed to or from other methods.

Value

An object similar to x containing just the selected rows and columns. Depending on the columns remaining after subsetting the class of the object will be simplified to the most derived parent class.

Examples

Run this code
# NOT RUN {
subset(sun.spct, w.length > 400)

# }

Run the code above in your browser using DataLab