Skip to contents

Functions to query if an filter spectrum contains spectral absorbance data or spectral transmittance data.

Usage

is_absorbance_based(x)

is_absorptance_based(x)

is_transmittance_based(x)

Arguments

x

an R object

Value

is_absorbance_based returns a logical value, TRUE if its argument is a filter_spct object that contains spectral absorbance data and FALSE otherwise, but returns NA for any other R object, including those belonging other generic_spct-derived classes.

is_absorptance_based returns a logical value, if its argument is a filter_spct object, TRUE if it contains data as spectral absorptance and FALSE otherwise, but returns NA for any other R object, including those belonging other generic_spct-derived classes.

is_transmittance_based returns TRUE if its argument is a filter_spct object that contains spectral transmittance data and FALSE if it does not contain such data, but returns NA for any other R object, including those belonging other generic_spct-derived classes.

See also

Other query units functions: is_mole_based(), is_photon_based()

Examples

is_absorbance_based(polyester.spct)
#> [1] FALSE
my.spct <- T2A(polyester.spct)
is.filter_spct(my.spct)
#> [1] TRUE
is_absorbance_based(my.spct)
#> [1] TRUE

is_absorptance_based(polyester.spct)
#> [1] FALSE

is_transmittance_based(polyester.spct)
#> [1] TRUE