View source: R/spct.normalize.r
| getNormalized | R Documentation |
Functions to read the "normalized" and "normalization" attributes of an existing generic_spct object.
getNormalized(x, .force.numeric = FALSE)
getNormalised(x, .force.numeric = FALSE)
getNormalization(x)
getNormalisation(x)
x |
a generic_spct object. |
.force.numeric |
logical If |
In some computations spectral data that have been normalized need to
be handled differently than data expressed in original units. Method
getNormalized() makes it possible to query if a
generic_spct or generic_mspct object or objects of derived
classes contain data expressed in true physical units or normalized.
Method getNormalization() retrieves from objects storing spectral
data, metadata that trace previously applied normalizations, making it
possible to revert the effect of earlier normalizations. The metadata are
also used when printing and plotting the spectra.
For objects containing a single spectrum, getNormalized()
returns a logical value, and exceptionally for objects created with
'photobiology' (< 0.10.8), a numeric value (normalization wavelength
expressed in nanometres). A character value for objects created with
'photobiology' (< 0.x.x). For collections of spectra and multiple spectra
in long form, a named list, with one logical member for each spectrum is
returned. If x is not a generic_spct object, NA is
returned with a warning.
For objects containing a single spectrum, getNormalization() returns
a list with five fields: norm.type, norm.wl,
norm.factors, norm.cols, norm.range. For collections
of spectra, a named list of lists, with one member list for each member of
the collection of spectra is returned. Objects created with versions of
package 'photobiology' (< 0.10.8) are lacking the detailed normalization
metadata, in which case getNormalized() must be used to detect
normalization. See setNormalized() for the values stored in
the fields. If x is not a generic_spct object, a named list
with all fields set to NA is returned with a warning.
While method getNormalized() returns in some cases numeric
values or possibly even character values if stored in attribute
normalized, is_normalized() always returns a logical value
and can be safely used in conditional code clauses.
getNormalised() is another name for getNormalized().
getNormalisation() is another name for getNormalization().
Other rescaling functions:
fscale(),
fshift(),
getScaled(),
is_normalized(),
is_scaled(),
normalize(),
setNormalized(),
setScaled()
getNormalized(sun.spct)
str(getNormalization(sun.spct))
norm_sun.spct <- normalize(sun.spct)
is_normalized(norm_sun.spct)
getNormalized(norm_sun.spct)
str(getNormalization(norm_sun.spct))
str(getNormalization(e2q(norm_sun.spct)))
norm_gel.spct <- normalize(yellow_gel.spct)
is_normalized(norm_gel.spct)
getNormalized(norm_gel.spct)
str(getNormalization(norm_gel.spct))
getNormalization(T2Afr(norm_gel.spct))
getNormalization(any2A(norm_gel.spct))
norm_sun_evening.mspct <- normalize(sun_evening.mspct[1:3])
str(is_normalized(norm_sun_evening.mspct))
str(getNormalized(norm_sun_evening.mspct))
str(getNormalization(norm_sun_evening.mspct))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.