photobiology (version 0.11.2)

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

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.

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.

Examples

Run this code

subset(sun.spct, w.length > 400)

Run the code above in your browser using DataLab