photobiologyInOut (version 0.4.19)

as.colorSpec: Convert into 'colorSpec::colorSpec' objects

Description

Convert spectral objects (xxxx_spct, xxxx_mspct) as defined in package 'photobiology' into colorSpec objects preserving as much information as possible.

Usage

# S3 method for generic_mspct
as.colorSpec(x, spct.data.var = NULL,
  multiplier = 1, ...)

# S3 method for generic_spct as.colorSpec(x, spct.data.var = NULL, multiplier = 1, ...)

# S3 method for chroma_spct as.colorSpec(x, spct.data.var = NULL, multiplier = 1, ...)

Arguments

x

R object

spct.data.var

character The name of the variable to read spectral data from.

multiplier

numeric A multiplier to be applied to the 'spc' data to do unit or scale conversion.

...

currently ignored.

Methods (by class)

  • generic_spct:

  • chroma_spct:

Warning!

Always check the sanity of the returned data values, as guessing is needed when matching the different classes, and the functions defined here are NOT guaranteed to return valid data wihtout help from the user through optional function arguments.

Examples

Run this code
# NOT RUN {
library(colorSpec)

# }

Run the code above in your browser using DataLab