Learn R Programming

ggspectra (version 0.3.13)

Afr_label: Absorptance axis labels

Description

Generate cps axis labels in SI units, using SI scale factors. Output can be selected as character, expression (R default devices) or LaTeX (for tikz device).

Usage

Afr_label(
  unit.exponent = ifelse(pc.out, -2, 0),
  format = getOption("photobiology.math", default = "R.expression"),
  label.text = axis_labels()[["s.Afr"]],
  scaled = FALSE,
  normalized = FALSE,
  axis.symbols = getOption("ggspectra.axis.symbols", default = TRUE),
  pc.out = getOption("ggspectra.pc.out", default = FALSE)
)

Rfr_total_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) )

Value

a character string or an R expression.

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 the name. Supported only by format = "R.expression".

pc.out

logical, if TRUE use percent as default instead of fraction of one.

Examples

Run this code

Afr_label()
Afr_label(format = "R.expression", axis.symbols = FALSE)
Afr_label(-2)
Afr_label(-3)
Afr_label(format = "R.expression")
Afr_label(format = "LaTeX")
Afr_label(-2, format = "LaTeX")


Rfr_total_label()
Rfr_total_label(axis.symbols = FALSE)
Rfr_total_label(-2)
Rfr_total_label(-3)
Rfr_total_label(format = "R.expression")
Rfr_total_label(format = "LaTeX")
Rfr_total_label(-3, format = "LaTeX")

Run the code above in your browser using DataLab