View source: R/generate_varlabel.R
generate_varlabel | R Documentation |
Create a label containing the variable name and unit and optional additional information to be used in maps and plots.
generate_varlabel(
x = NULL,
variable = NULL,
unit = NULL,
method = NULL,
period = NULL,
verbose = FALSE
)
x |
The object to be plotted. If x is provided and the variable and unit names are not explicitly stated, this information is extracted from the attributes of x. |
unit |
Unit name. If provided, unit is used rather than the attr(x, 'unit') |
method |
Method. If provided, this information is added to the label |
period |
Time period. If provided, this information is added to the label |
verbose |
If TRUE, print information about the progress |
variabel |
Variable name. If provided, variable is used rather than the attr(x, 'variable') |
An expression to be used as a label in maps and plots
data(bjornholt)
label <- generate_varlabel(bjornholt)
print(label)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.