Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_photon_based

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


Description

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

Usage

is_photon_based(x)

is_energy_based(x)

Arguments

x

any R object

Value

is_photon_based returns TRUE if its argument is 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 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

colnames(sun.spct)
is_photon_based(sun.spct)
my.spct <- sun.spct[ , c("w.length", "s.e.irrad")]
is.source_spct(my.spct)
is_photon_based(my.spct)

colnames(sun.spct)
is_energy_based(sun.spct)
my.spct <- sun.spct[ , c("w.length", "s.q.irrad")]
is.source_spct(my.spct)
is_energy_based(my.spct)

photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.