grab_assignments_from_dots | R Documentation |
...
arguments as assignments.Re-write captured ...
arguments as a c(DESTINATION = TARGET)
character vector.
Suggested capture code is: substitute(list(...))
. Allows bquote
.()
substitution.
grab_assignments_from_dots(
captured_args,
unpack_environment = parent.frame(),
allow_dot_on_left = FALSE
)
captured_args |
captured |
unpack_environment |
environment to look in |
allow_dot_on_left |
logical if TRUE allow forms like |
named character vector describing the desired mapping.
f <- function(...) {
unpack_environment <- parent.frame(n = 1)
orig_args <- substitute(list(...))
grab_assignments_from_dots(orig_args, unpack_environment)
}
f(a, c = d, e := f, g <- h, i -> j)
# should equal c('a', 'c' = 'd', 'e' = 'f', 'g' = 'h', 'j' = 'i')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.