Make a mutation in one function
Usage
mutate_one(x)
# Default S3 method
mutate_one(x)
# S3 method for class '`function`'
mutate_one(x)
# S3 method for class 'ast'
mutate_one(x)
Arguments
- x
a data.frame, the output of
utils::getParseData()
, called fromparse_fxns()
Note
uses astr::ast_modify()
internally
Examples
if (FALSE) { # \dontrun{
foo <- function(x) {
if (x == 1) x else 5
}
mutate_one(foo)
mutate_one(astr::ast_decompose(foo))
} # }