split2mspct: Convert a 'wide' or untidy data frame into a collection of...

Description Usage Arguments See Also

View source: R/zmspct.classes.R

Description

Convert a data frame object into a "multi spectrum" object by constructing a an object of a multi-spct class, converting numeric columns other than wavelength into individual spct objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
split2mspct(x, member.class = NULL, spct.data.var = NULL,
  w.length.var = "w.length", idx.var = NULL, ncol = 1, byrow = FALSE,
  ...)

split2source_mspct(x, spct.data.var = "s.e.irrad",
  w.length.var = "w.length", idx.var = NULL, ncol = 1, byrow = FALSE,
  ...)

split2response_mspct(x, spct.data.var = "s.e.response",
  w.length.var = "w.length", idx.var = NULL, ncol = 1, byrow = FALSE,
  ...)

split2filter_mspct(x, spct.data.var = "Tfr", w.length.var = "w.length",
  idx.var = NULL, ncol = 1, byrow = FALSE, ...)

split2reflector_mspct(x, spct.data.var = "Rfr", w.length.var = "w.length",
  idx.var = NULL, ncol = 1, byrow = FALSE, ...)

split2cps_mspct(x, spct.data.var = "cps", w.length.var = "w.length",
  idx.var = NULL, ncol = 1, byrow = FALSE, ...)

split2raw_mspct(x, spct.data.var = "count", w.length.var = "w.length",
  idx.var = NULL, ncol = 1, byrow = FALSE, ...)

split2calibration_mspct(x, spct.data.var = "irrad.mult",
  w.length.var = "w.length", idx.var = NULL, ncol = 1, byrow = FALSE,
  ...)

Arguments

x

data frame

member.class

character Class of the collection members

spct.data.var

character Name of the spectral data argument in the object constructor for member.class

w.length.var

character Name of column containing wavelength data in nanometres

idx.var

character Name of column containing data to be copied unchanged to each spct object

ncol

integer Number of 'virtual' columns in data

byrow

logical If ncol > 1 how to read in the data

...

additional named arguments passed to the member constructor function.

See Also

Other Coercion methods for collections of spectra: as.calibration_mspct, as.chroma_mspct, as.cps_mspct, as.filter_mspct, as.generic_mspct, as.object_mspct, as.raw_mspct, as.reflector_mspct, as.response_mspct, as.source_mspct, subset2mspct


photobiology documentation built on April 3, 2018, 1:06 a.m.