Learn R Programming

photobiology (version 0.9.6)

tag: Tag a spectrum

Description

Spectra are tagged by adding variables and attributes containing color definitions, labels, and a factor following the wavebands given in w.band.

Usage

tag(x, ...)

## S3 method for class 'default':
tag(x, ...)

## S3 method for class 'generic_spct':
tag(x, w.band = NULL,
  wb.trim = getOption("photobiology.waveband.trim", default = TRUE),
  use.hinges = TRUE, short.names = TRUE, byref = FALSE, ...)

## S3 method for class 'generic_mspct':
tag(x, w.band = NA,
  wb.trim = getOption("photobiology.waveband.trim", default = TRUE),
  use.hinges = TRUE, short.names = TRUE, byref = FALSE, ...)

Arguments

x
an R object
...
not used in current version
w.band
waveband or list of waveband objects The waveband(s) determine the region(s) of the spectrum that are tagged
wb.trim
logical Flag telling if wavebands crossing spectral data boundaries are trimmed or ignored
use.hinges
logical Flag indicating whether to use hinges to reduce interpolation errors
short.names
logical Flag indicating whether to use short or long names for wavebands
byref
logical Flag indicating if new object will be created by reference or by copy of x

Methods (by class)

  • default: Default method for generic
  • generic_spct: Tag one ofgeneric_spct, and derived classes includingsource_spct,filter_spct,reflector_spct,object_spct, andresponse_spct.
  • generic_mspct: Tag one ofgeneric_mspct, and derived classes includingsource_mspct,filter_mspct,reflector_mspct,object_mspct, andresponse_mspct.

See Also

Other tagging and related functions: is_tagged, untag, wb2rect_spct, wb2spct, wb2tagged_spct

Examples

Run this code
tag(sun.spct)
tag(sun.spct, list(A = waveband(c(300,3005))))

Run the code above in your browser using DataLab