| ion_labeller | R Documentation | 
ion_labeller and R_labeller converts a character string
containing chemical species names in a latex string or expression. The
stat_labeller function generates labels for statistics in tables
(latex) or on plots (expressions).
ion_labeller(ion, label = "latex") R_labeller(ion1, ion2, label = "latex") stat_labeller(var, org, stat, value, label = "latex")
ion | 
 A chemical species character string  | 
label | 
 Character string indicating whether the output should be
  | 
ion1 | 
 A chemical species character string (for isotope ratios the rare isotope).  | 
ion2 | 
 A chemical species character string (for isotope ratios the common isotope).  | 
var | 
 A character string for the variable, either   | 
org | 
 A character string for the origin of a derived variable, e.g., R.  | 
stat | 
 A character string for the statistic following convention of e.g.
  | 
value | 
 The numeric value for the statistic result.  | 
This functions converts chemical species names of the form, e.g. '"12C"', '"13C2"', '"12C 14N"', or '"12C-14N"' to a character string which can be parsed in Latex to species names with appropriate superscripts on th left for mass and subscripts for the index on the right.
A character string parsable in Latex or expression for usage in plots.
# plot some ion count data
library(ggplot2)
ggplot() +
 geom_blank() +
 ylab(ion_labeller("12C2-40Ca", "expr")) +
 xlab(R_labeller("12C2-40Ca", "13C2-40Ca", "expr"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.