Spectra are tagged by adding variables and attributes containing color
definitions, labels, and a factor following the wavebands given in
w.band
. This methods are most useful for plotting realistic
computed colors from spectral data.
tag(x, ...)# S3 method for default
tag(x, ...)
# S3 method for generic_spct
tag(
x,
w.band = NULL,
wb.trim = getOption("photobiology.waveband.trim", default = TRUE),
use.hinges = TRUE,
short.names = TRUE,
chroma.type = "CMF",
byref = FALSE,
...
)
# S3 method for generic_mspct
tag(
x,
w.band = NULL,
wb.trim = getOption("photobiology.waveband.trim", default = TRUE),
use.hinges = TRUE,
short.names = TRUE,
chroma.type = "CMF",
byref = FALSE,
...,
.parallel = FALSE,
.paropts = NULL
)
an R object.
ignored (possibly used by derived methods).
waveband or list of waveband objects. The waveband(s) determine the region(s) of the spectrum that are tagged
logical Flag telling if wavebands crossing spectral data boundaries are trimmed or ignored
logical Flag indicating whether to insert "hinges" into the spectral data before integration so as to reduce interpolation errors at the boundaries of the wavebands.
logical Flag indicating whether to use short or long names for wavebands
character telling whether "CMF", "CC", or "both" should be returned
for human vision, or an object of class chroma_spct
for any other
trichromic visual system.
logical Flag indicating if new object will be created by
reference or by copy of x
if TRUE, apply function in parallel, using parallel backend provided by foreach
a list of additional options passed into the foreach function when parallel computation is enabled. This is important if (for example) your code relies on external data or packages: use the .export and .packages arguments to supply them so that all cluster nodes have the correct environment set up for computing.
A copy of x
expanded with additional columns with
color-related information.
default
: Default method for generic
generic_spct
: Tag one of generic_spct
, and derived classes including
source_spct
, filter_spct
, reflector_spct
,
object_spct
, and response_spct
.
generic_mspct
: Tag one of generic_mspct
, and derived classes including
source_mspct
, filter_mspct
, reflector_mspct
,
object_mspct
, and response_mspct
.
Other tagging and related functions:
is_tagged()
,
untag()
,
wb2rect_spct()
,
wb2spct()
,
wb2tagged_spct()
# NOT RUN {
tag(sun.spct)
tag(sun.spct, list(A = waveband(c(300,3005))))
# }
Run the code above in your browser using DataLab