Generate spectral reflectance labels in SI units, using SI scale factors. Output can be selected as character, expression (R default devices) or LaTeX (for tikz device).
Usage
Rfr_label(
unit.exponent = ifelse(pc.out, -2, 0),
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
Rfr.type
)
Rfr_specular_label(
unit.exponent = ifelse(pc.out, -2, 0),
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
scaled = FALSE,
normalized = FALSE,
axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
pc.out = getOption("ggspectra.pc.out", default = FALSE)
)
Arguments
- unit.exponent
integer
- format
character string, "R", "R.expresion", "R.character", or "LaTeX".
- label.text
character Textual portion of the labels.
- scaled
logical If
TRUE
relative units are assumed.- normalized
logical (
FALSE
) or numeric Normalization wavelength in manometers (nm).- axis.symbols
logical If
TRUE
symbols of the quantities are added to thename
. Supported only byformat = "R.expression"
.- pc.out
logical, if TRUE use percent as default instead of fraction of one.
- Rfr.type
character, either "total" or "specular".
Examples
Rfr_label(Rfr.type = "specular")
#> "Specular spectral reflectance, " ~ rho[lambda] ~ plain("(/1)")
Rfr_label(Rfr.type = "total")
#> "Total spectral reflectance, " ~ rho[lambda] ~ plain("(/1)")
Rfr_specular_label()
#> "Specular spectral reflectance, " ~ rho[lambda] ~ plain("(/1)")
Rfr_specular_label(axis.symbols = FALSE)
#> "Specular spectral reflectance, " ~ plain("(/1)")
Rfr_specular_label(-2)
#> "Specular spectral reflectance, " ~ rho[lambda] ~ plain("(%)")
Rfr_specular_label(-3)
#> "Specular spectral reflectance, " ~ rho[lambda] ~ plain("(permil)")
Rfr_specular_label(format = "R.expression")
#> "Specular spectral reflectance, " ~ rho[lambda] ~ plain("(/1)")
Rfr_specular_label(format = "LaTeX")
#> [1] "Specular spectral reflectance, $\\rho_{\\lambda}$ (/1)"
Rfr_specular_label(-3, format = "LaTeX")
#> [1] "Specular spectral reflectance, $\\rho_{\\lambda}$ (permil)"