[R] Passing additional arguments through '...'

escher2079 aluedtke at upenn.edu
Wed Jul 15 18:06:18 CEST 2009


Hi,

I know this is a simple question, but I've been having problems passing
additional arguments through '...'. It is not matching the arguments
correctly if the permanent argument of the function begins with the same
letter as the additional argument. The following example will help show what
I mean:

fun.tester <- function(abc,...){
+ print(abc)
+ }

But if I input:
fun.tester(0,a=1)

It returns the value '1' for abc. It does however, work properly if I input:
fun.tester(abc=0,a=1)

It seems like a simple problem, so I would assume I'm doing something
stupid, but I haven't been able to find a solution anywhere. Thanks!
-- 
View this message in context: http://www.nabble.com/Passing-additional-arguments-through-%27...%27-tp24501159p24501159.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list