Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

subset

Subset SpectraDataFrame object


Description

Returns subsets of a SpectraDataFrame object.

Usage

subset(x, ...)

Arguments

x

SpectraDataFrame object

...

see details below

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

Value

SpectraDataFrame object

Author(s)

Pierre Roudier pierre.roudier@gmail.com

See Also

Examples

# 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)

spectacles

Storing, Manipulating and Analysis Spectroscopy and Associated Data

v0.5-3
GPL-3
Authors
Pierre Roudier [aut, cre], Max Kuhn [ctb], Kristian Hovde Liland [ctb], Bjorn-Helge Mevik [ctb], Hadley Wickham [ctb], Raphael Viscarra Rossel [dtc]
Initial release
2021-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.