is_normalized: Query whether a generic spectrum has been normalized.

View source: R/spct.normalize.r

is_normalizedR Documentation

Query whether a generic spectrum has been normalized.

Description

This function tests a generic_spct object for an attribute that signals whether the spectral data has been normalized or not after the object was created.

Usage

is_normalized(x)

is_normalised(x)

Arguments

x

An R object.

Value

A logical value indicating if x is normalized or not, for collections of spectra, a named list with logicals as members. If x is not a generic_spct or generic_mspct object the value returned is NA.

Note

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.

is_normalised() is another name for is_normalized().

See Also

Other rescaling functions: fscale(), fshift(), getNormalized(), getScaled(), is_scaled(), normalize(), setNormalized(), setScaled()

Examples

norm_sun.spct <- normalize(sun.spct)
is_normalized(norm_sun.spct)

norm_sun_evening.mspct <- normalize(sun_evening.mspct[1:3])
str(is_normalized(norm_sun_evening.mspct))


photobiology documentation built on March 15, 2026, 9:06 a.m.