# NOT RUN {
x <- args_and_kwargs(unnamed_1, named_1="ba", "unnamed_2", named_2 = letters)
print(x$args)
print(x$kwargs)
# }
# NOT RUN {
# Or see the `share_scales` from the `zplyr` package
share_scales <- function(...) {
akw <- args_and_kwargs(...)
# Unnamed arguments are ggplot scales
geom_func_list <- purrr::map(akw$args, rlang::eval_tidy)
# Named arguments are to be passed into those scales
geoms <- purrr::map(geom_func_list, ~.(!!!akw$kwargs))
return(geoms)
}
# }
Run the code above in your browser using DataLab