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

generic_mspct

Collection-of-spectra constructor


Description

Converts a list of spectral objects into a "multi spectrum" object by setting the class attribute of the list of spectra to the corresponding multi-spct class, check that components of the list belong to the expected class.

Usage

generic_mspct(
  l = NULL,
  class = "generic_spct",
  ncol = 1,
  byrow = FALSE,
  dim = c(length(l)%/%ncol, ncol)
)

calibration_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

raw_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

cps_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

source_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

filter_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

reflector_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

object_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

response_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

chroma_mspct(l = NULL, ncol = 1, byrow = FALSE, ...)

Arguments

l

list of generic_spct or derived classes

class

character The multi spectrum object class or the expected class for the elements of l

ncol

integer Number of 'virtual' columns in data

byrow

logical If ncol > 1 how to read in the data

dim

integer vector of dimensions

...

ignored

Functions

  • calibration_mspct: Specialization for collections of calibration_spct objects.

  • raw_mspct: Specialization for collections of raw_spct objects.

  • cps_mspct: Specialization for collections of cps_spct objects.

  • source_mspct: Specialization for collections of source_spct objects.

  • filter_mspct: Specialization for collections of filter_spct objects.

  • reflector_mspct: Specialization for collections of reflector_spct objects.

  • object_mspct: Specialization for collections of object_spct objects.

  • response_mspct: Specialization for collections of response_spct objects.

  • chroma_mspct: Specialization for collections of chroma_spct objects.

Note

Setting class = source_spct or class = source_mspct makes no difference

Examples

filter_mspct(list(polyester.spct, yellow_gel.spct))

photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

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