[R] How to convert a list to a ... argument for a function
Richard R. Liu
richard.liu at pueo-owl.ch
Tue Oct 5 20:23:41 CEST 2010
Hi,
I have a function f <- function(..., func){ something }, where func is a
function of the form function(...). I would like to pass func all the arguments
passed to f except the last. I know that I can manipulate the variable number
of arguments passed to f by converting ... to a list, i.e., arglist <-
list(...). But how do I pass func the first n-1 list items of arglist (n <-
length(arglist)), as n-1 arguments, not as one list of n-1 items?
Regards,
Richard
Richard R. Liu
richard.liu at pueo-owl.ch
More information about the R-help
mailing list