View source: R/lav_label_code.R
| lav_label_code | R Documentation |
Creates the code used to show the label in tikz, svg or R. The label is plotted in an xy-plot if show = TRUE.
lav_label_code(label = "", value = "", show =FALSE,
idx_font_size = 20L, dy = 7L,
italic = TRUE, auto_subscript = TRUE)
label |
A character string in one of the formats
If value is specified in parameter |
value |
A character string specifying a value or empty. |
show |
A logical indicating that the result should be plotted in an Rplot. |
idx_font_size |
An integer specifying font size to use for the subscript in svg. |
dy |
An integer specifying the distance to move the baseline of the subscript in svg. |
italic |
A logical indicating whether the label's font should be italic. Only used for tikz output and in the displayed Rplot when the result is not an expression. |
auto_subscript |
Logical, if TRUE and |
If both label and value are empty, the resulting codes are
also empty and nothing will be shown.
If label is empty and value is not, processing is done as if
label was specified and value was empty.
If label contains the string "1van", the label value is set to "1".
This allows distinct names for regression intercepts while still labeling
them as "1".
If name in label is a Greek character or varepsilon,
the function attempts to generate code that shows the Greek symbol. If
label contains an index part, the function attempts to generate
code that displays this value as a subscript. In the svg code, the values
idx_font_size and dy are used for the subscript. If a
value is present, the function attempts to show this value after the
label, with an equal sign between the two.
a list with members svg, tikz and r, giving the result.
lav_label_code("x3")
lav_label_code("beta10", 0.65, show = TRUE)
lav_label_code("A_i,j=0.45", show = TRUE)
lav_label_code("Gamma")
lav_label_code(value="1.2345")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.