Re: [R] Use of the dot.dot.dot option in functions.

2011-04-06 Thread Duncan Murdoch
On 06/04/2011 12:04 PM, KENNETH R CABRERA wrote: Hi R users: I try this code, where "fun" is a parameter of a random generating function name, and I pretend to use "..." parameter to pass the parameters of different random generating functions. What am I doing wrong? f1<-function(nsim=20,n=10,

[R] Use of the dot.dot.dot option in functions.

2011-04-06 Thread KENNETH R CABRERA
Hi R users: I try this code, where "fun" is a parameter of a random generating function name, and I pretend to use "..." parameter to pass the parameters of different random generating functions. What am I doing wrong? f1<-function(nsim=20,n=10,fun=rnorm,...){ vp<-replicate(nsim,t.test(fun(