Re: [R] passing elements of named vector / named list to function

2015-01-16 Thread Rainer M Krug
Jeff Newmiller writes: > It x is a list... > > do.call(fun,x) Thanks - works perfectly. Only one further question: In my original usage, fun() is an S3 Generic Function and takes as the first argument an object which obviously *must not be* expanded, while the ... need to be extended. --8<

Re: [R] passing elements of named vector / named list to function

2015-01-15 Thread Jeff Newmiller
It x is a list... do.call(fun,x) You should keep external data input away from this code construct to avoid intentional or unintentional misuse of your fun. If your toy example were your actual usage I would suggest the collapse argument of paste. --

[R] passing elements of named vector / named list to function

2015-01-15 Thread Rainer M Krug
Hi Following scenario: I have a function fun --8<---cut here---start->8--- fun <- function(A, B, C, ...){paste(A, B, C, ...)} --8<---cut here---end--->8--- and x defined as follow --8<---cut here---