tag: Tag a spectrum

Description Usage Arguments Methods (by class) Note See Also Examples

View source: R/spct.tag.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
tag(x, ...)

## Default S3 method:
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 = NULL,
  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)

Note

NULL as w.band argument does not add any new tags, instead it removes existing tags if present. NA, the default, as w.band argument removes existing waveband tags if present and sets the wl.color variable. If a waveband object or a list of wavebands is supplied as argument then tagging is based on them, and wl.color is also set.

See Also

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

Examples

1
2
tag(sun.spct)
tag(sun.spct, list(A = waveband(c(300,3005))))

photobiology documentation built on June 25, 2017, 5:03 p.m.