appendToBody | R Documentation |
Append values to function body
appendToBody(fun, values, after = 1L)
fun |
|
values |
|
after |
|
function
.
Updated 2019-08-23.
## Add a deprecation call into function body.
fun <- function() {
print("hello world")
}
body(fun)
## values: call ====
values <- as.call(quote(.Deprecated("XXX")))
x <- appendToBody(fun = fun, values = values)
body(x)
## values: list ====
values <- list(
quote(print("AAA")),
quote(print("BBB"))
)
x <- appendToBody(fun = fun, values = values)
body(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.