View source: R/format_create.R
| e | R Documentation |
Marks a format label string so it will be evaluated as an R expression
at apply-time (fput), even when it does not contain
.x1, .x2, etc. placeholders.
e(expr)
expr |
Character string. The R expression to evaluate. |
This is useful when a label should call a function that does not need
positional .xN arguments.
The expression is evaluated in the caller's environment of
fput, so user-defined functions are accessible.
Labels containing .x1, .x2, etc. are still evaluated
automatically without needing e().
The same character string with an "eval" attribute set to
TRUE.
# Mark an expression for evaluation at apply-time
fmt <- fnew(
"timestamp" = e("format(Sys.time(), '%Y-%m-%d')"),
"static" = "Hello",
name = "demo_eval"
)
fput(c("timestamp", "static"), fmt)
fclear()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.