refer | R Documentation |
Creates names for elements of a vector.
refer(x, fmt = "%s_{%.0f}", to = deparse(substitute(x)), index = 1:length(x))
refer2vector(
x,
fmt = "%s_{%.0f}",
to = deparse(substitute(x)),
index = 1:length(x)
)
x |
vector: a vector to create the names for |
fmt |
character: format string for |
to |
character: base name of elements |
index |
numeric: vector with indices (default: |
A character vector
x <- runif(5)
refer(x) # LaTeX default
refer(x, fmt="%s[%.0f]") # R default
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.