Creates the code to use in tikz, svg or R to show the label. The label is printed 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)a list with members svg, tikz and r, giving the result.
A character string in one of the formats
name
name_index
name=value
name_index=value
If value is specified in parameter label and parameter
value is empty, the value in label will be used.
A character string specifying a value or empty.
A logical indicating that the result should be plotted in an Rplot.
An integer specifying font size to use for the subscript in svg.
An integer specifying the distance to move the baseline of the subscript in svg.
A logical to indicate if the labels font should be cursive. Only used for tikz output and in shown Rplot if result isn't an expression.
Logical, if TRUE and label starts with one or more
alhabetic chars followed by one or more digits, an underscore will be
inserted between these parts.
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
is to allow distinct names for regression intercepts and still label them as "1".
If name in label is a Greek character or varepsilon,
it is attempted to generate code which shows the Greek symbol. If there is an
index part in label, it is attempted to generate code which
displays this value as a subscript. In the svg code the values
idx.font.size and dy are used for the subscript in the
generated code. If a value is present, it is attempted
to show this value after the label, with an equal sign in between both.
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")
Run the code above in your browser using DataLab