setGenericSpct: Convert an R object into a spectrum object.

Description Usage Arguments Value Functions Note See Also Examples

View source: R/spct.classes.r

Description

Sets the class attribute of a data.frame or an object of a derived class to "generic_spct".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
setGenericSpct(x, multiple.wl = 1L, idfactor = NULL)

setCalibrationSpct(x,
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L, idfactor = NULL)

setRawSpct(x, strict.range = getOption("photobiology.strict.range",
  default = FALSE), multiple.wl = 1L, idfactor = NULL)

setCpsSpct(x, time.unit = "second",
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L, idfactor = NULL)

setFilterSpct(x, Tfr.type = c("total", "internal"),
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L, idfactor = NULL)

setReflectorSpct(x, Rfr.type = c("total", "specular"),
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L, idfactor = NULL)

setObjectSpct(x, Tfr.type = c("total", "internal"),
  Rfr.type = c("total", "specular"),
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L, idfactor = NULL)

setResponseSpct(x, time.unit = "second", multiple.wl = 1L,
  idfactor = NULL)

setSourceSpct(x, time.unit = "second", bswf.used = c("none",
  "unknown"), strict.range = getOption("photobiology.strict.range",
  default = FALSE), multiple.wl = 1L, idfactor = NULL)

setChromaSpct(x, multiple.wl = 1L, idfactor = NULL)

Arguments

x

data.frame, list or generic_spct and derived classes

multiple.wl

numeric Maximum number of repeated w.length entries with same value.

idfactor

character Name of factor distinguishing multiple spectra when stored logitudinally (required if mulitple.wl > 1).

strict.range

logical Flag indicating whether off-range values result in an error instead of a warning.

time.unit

character A string "second", "day" or "exposure".

Tfr.type

character A string, either "total" or "internal".

Rfr.type

character A string, either "total" or "specular".

bswf.used

character A string, either "none" or the name of a BSWF.

Value

x

Functions

Note

This method alters x itself by reference and in addition returns x invisibly.

See Also

Other set and unset spectral class functions: rmDerivedSpct

Examples

1
2
3
4
my.df <- data.frame(w.length = 300:309, s.e.irrad = rep(100, 10))
is.source_spct(my.df)
setSourceSpct(my.df)
is.source_spct(my.df)

photobiology documentation built on Dec. 11, 2018, 9:05 a.m.