powered by
This function extracts the body of a function as a single character.
character
function_body(fun, braces = FALSE, nchar = getOption("width") - 4)
A character, the body of f.
f
[function] A function.
function
[logical(1)] Remove "{" and "}" at start and end (if any)?
logical(1)
"{"
"}"
[integer(1)] The maximum number of characters before abbreviation, at least 3.
integer(1)
3
Other function helpers: do.call_timed(), function_arguments(), function_defaults(), quiet(), timed(), try_silent(), variable_name()
do.call_timed()
function_arguments()
function_defaults()
quiet()
timed()
try_silent()
variable_name()
fun <- mean.default function_body(fun) function_body(fun, braces = TRUE) function_body(fun, nchar = 30)
Run the code above in your browser using DataLab