Description Usage Arguments Value Methods (by class) Note See Also Examples
View source: R/spct.normalize.r
These functions return a spectral object of the same class as the one supplied as argument but with the spectral data normalized to 1.o a certain wavelength.
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64  normalize(x, ...)
## Default S3 method:
normalize(x, ...)
## S3 method for class 'source_spct'
normalize(x, ..., range = NULL, norm = "max",
unit.out = getOption("photobiology.radiation.unit", default =
"energy"), na.rm = FALSE)
## S3 method for class 'response_spct'
normalize(x, ..., range = NULL, norm = "max",
unit.out = getOption("photobiology.radiation.unit", default =
"energy"), na.rm = FALSE)
## S3 method for class 'filter_spct'
normalize(x, ..., range = NULL, norm = "max",
qty.out = getOption("photobiology.filter.qty", default =
"transmittance"), na.rm = FALSE)
## S3 method for class 'reflector_spct'
normalize(x, ..., range = NULL, norm = "max",
qty.out = NULL, na.rm = FALSE)
## S3 method for class 'raw_spct'
normalize(x, ..., range = NULL, norm = "max",
na.rm = FALSE)
## S3 method for class 'cps_spct'
normalize(x, ..., range = NULL, norm = "max",
na.rm = FALSE)
## S3 method for class 'generic_spct'
normalize(x, ..., range = NULL, norm = "max",
col.names, na.rm = FALSE)
## S3 method for class 'source_mspct'
normalize(x, ..., range = NULL, norm = "max",
unit.out = getOption("photobiology.radiation.unit", default =
"energy"), na.rm = FALSE, .parallel = FALSE, .paropts = NULL)
## S3 method for class 'response_mspct'
normalize(x, ..., range = NULL, norm = "max",
unit.out = getOption("photobiology.radiation.unit", default =
"energy"), na.rm = FALSE, .parallel = FALSE, .paropts = NULL)
## S3 method for class 'filter_mspct'
normalize(x, ..., range = NULL, norm = "max",
qty.out = getOption("photobiology.filter.qty", default =
"transmittance"), na.rm = FALSE, .parallel = FALSE,
.paropts = NULL)
## S3 method for class 'reflector_mspct'
normalize(x, ..., range = x, norm = "max",
qty.out = NULL, na.rm = FALSE, .parallel = FALSE,
.paropts = NULL)
## S3 method for class 'raw_mspct'
normalize(x, ..., range = x, norm = "max",
na.rm = FALSE, .parallel = FALSE, .paropts = NULL)
## S3 method for class 'cps_mspct'
normalize(x, ..., range = x, norm = "max",
na.rm = FALSE, .parallel = FALSE, .paropts = NULL)

x 
An R object 
... 
not used in current version 
range 
An R object on which 
norm 
numeric Normalization wavelength (nm) or character string "max", or "min" for normalization at the corresponding wavelength. 
unit.out 
character Allowed values "energy", and "photon", or its alias "quantum" 
na.rm 
logical indicating whether 
qty.out 
character string Allowed values are "transmittance", and "absorbance" indicating on which quantity to apply the normalization. 
col.names 
character vector containing the names of columns or variables to which to apply the normalization. 
.parallel 
if TRUE, apply function in parallel, using parallel backend provided by foreach 
.paropts 
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
, with spectral data values normalized to one for
the criterion specified by the argument passed to norm
.
A copy of x
with the values of the spectral quantity rescaled
to 1 at the normalization wavelength. If the normalization wavelength is
not already present in x
, it is added by interpolation—i.e. the
returned value may be one row longer than x
.
default
: Default for generic function
source_spct
: Normalize a source_spct
object.
response_spct
: Normalize a response spectrum.
filter_spct
: Normalize a filter spectrum.
reflector_spct
: Normalize a reflector spectrum.
raw_spct
: Normalize a raw spectrum.
cps_spct
: Normalize a cps spectrum.
generic_spct
: Normalize a raw spectrum.
source_mspct
: Normalize the members of a source_mspct object.
response_mspct
: Normalize the members of a response_mspct object.
filter_mspct
: Normalize the members of a filter_mspct object.
reflector_mspct
: Normalize the members of a reflector_mspct object.
raw_mspct
: Normalize the members of a raw_mspct object.
cps_mspct
: Normalize the members of a cps_mspct object.
1) By default if x
contains one or more NA
values and the
normalization is based on a summary quantity, the returned spectrum will
contain only NA
values. If na.rm == TRUE
then the summary
quantity will be calculated after striping NA
values, and only the
values that were NA
in x
will be NA values in the returned
spectrum.
Other rescaling functions: fscale
,
fshift
, getNormalized
,
is_normalized
, is_scaled
,
setNormalized
, setScaled
1 2 3 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.