Learn R Programming

photobiology (version 0.9.6)

subset2mspct: Convert 'long' or tidy spectral data into a collection of spectra

Description

Convert a data frame object or spectral object into a collection of soectra object of the corresponding class. For data frames converting numeric columns other than wavelength into individual spct objects.

Usage

subset2mspct(x, member.class = NULL, idx.var = "spct.idx",
  drop.idx = TRUE, ncol = 1, byrow = FALSE, ...)

Arguments

x
a generic_spct object or a derived class, or a data frame
member.class
character string
idx.var
character Name of column containing data to be copied unchanged to each spct object
drop.idx
logical Flag indicating whether to drop or keep idx.var in the collection members.
ncol
integer Number of 'virtual' columns in data
byrow
logical If ncol > 1 how to read in the data
...
additional arguments

See Also

Other collections of spectra classes family: generic_mspct, split2mspct