Learn R Programming

spectacles (version 0.5-2-2)

subset: Subset SpectraDataFrame object

Description

Returns subsets of a SpectraDataFrame object.

Usage

subset(x, ...)

Arguments

x

SpectraDataFrame object

...

see details below

Value

SpectraDataFrame object

Details

Additional parameters:

subset

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

select

expression, indicating columns to select from the data slot

drop

passed on to "[" indexing operator

...

Additional arguments

See Also

mutate

Examples

Run this code
# NOT RUN {
# Loading example data
data(australia)
spectra(australia) <- sr_no ~ ... ~ 350:2500

# Subset on attributes
s <- subset(australia, carbon < 5)

# Subset and selection of attributes
s <- subset(australia, carbon < 5, select = 1)
# }

Run the code above in your browser using DataLab