Description Usage Arguments Details Value
Function to convert plot with newline characters to plotmath
1 | convertLabelToExpr(txt, test = FALSE)
|
txt |
- character vector of labels. |
test |
- flag to plot labels (for debugging) |
Converts the vector of labels to a text vector which can be parsed to yield a plotmath expression. Each label is first split by newline characters. The first split is re-split using ":". The last line is split by "R^2". The resulting splits are recombined in nested 'atop(x,y)' functions (see plotmath), with the first re-split interpreted as a plotmath expression, as is 'R^2'.
test=TRUE requires ggplot2 package.
character vector of labels
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.