Function to write the "normalized" attribute of an existing generic_spct object.
setNormalized(
x,
norm = FALSE,
norm.type = NA_character_,
norm.factors = NA_real_,
norm.cols = NA_character_,
norm.range = rep(NA_real_, 2),
verbose = getOption("verbose_as_default", default = FALSE)
)setNormalised(
x,
norm = FALSE,
norm.type = NA_character_,
norm.factors = NA_real_,
norm.cols = NA_character_,
norm.range = rep(NA_real_, 2),
verbose = getOption("verbose_as_default", default = FALSE)
)
a generic_spct object.
numeric (or logical) Normalization wavelength (nanometres).
character Type of normalization applied.
numeric The scaling factor(s) so that dividing the spectral values by this factor reverts the normalization.
character The name(s) of the data columns normalized.
numeric The wavelength range used for normalization (nm).
logical Flag enabling or silencing informative warnings.
This function is used internally, although occasionally
users may want to use it to "pretend" that spectral data have not been
normalized. Use normalize()
methods to apply a normalization
and set the attributes accordingly. Function setNormalized()
only
sets the attributes that store the metadata corresponding to an already
applied normalization. Thus a trace of the transformations applied to
spectral data is kept, which currently is used to renormalize the spectra
when the quantity used for expression is changed with a conversion
function. It is also used in other packages like 'ggspectra' when
generating automatically axis labels. If x
is not a
generic_spct
object, x
is not modified.
Other rescaling functions:
fscale()
,
fshift()
,
getNormalized()
,
getScaled()
,
is_normalized()
,
is_scaled()
,
normalize()
,
setScaled()