View source: R/ast_decompose.R
ast_decompose | R Documentation |
Decompose an R function
ast_decompose(x)
x |
a function |
result of utils::getParseData()
, a data.frame; but
we wrap it in a thin S3 wrapper to make it easy to see how the
function changes as you modify it with ast_modify()
foo <- function(x) {
x + 1
}
foo(5)
df <- ast_decompose(foo)
df
data.frame(df)
attributes(df)
attr(df, "expr")
attr(df, "expr")[1,"text"] # the original fxn
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.