Query if a spectrum contains photon- or energy-based data.

Share:

Description

Functions to check if source_spct and response_spct objects contains photon-based or energy-based data.

Usage

1
2
3

Arguments

x

any R object

Value

is_photon_based returns TRUE if its argument is a a source_spct or a response_spct object that contains photon base data and FALSE if such an object does not contain such data, but returns NA for any other R object, including those belonging other generic_spct-derived classes.

is_energy_based returns TRUE if its argument is a a source_spct or a response_spct object that contains energy base data and FALSE if such an object 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_absorbance_based

Examples

1
2
3
4
5
6
7
8
9
is_photon_based(sun.spct)
my.spct <- dplyr::select(sun.spct, w.length, s.e.irrad)
is.source_spct(my.spct)
is_photon_based(my.spct)

is_energy_based(sun.spct)
my.spct <- dplyr::select(sun.spct, w.length, s.q.irrad)
is.source_spct(my.spct)
is_energy_based(my.spct)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.