Re: [R] Repeating a function in R

2011-07-05 Thread Uwe Ligges
On 05.07.2011 16:47, Daniel Malter wrote: Thanks, Uwe, for sending me this the second time. Daniel, I do not track names, sorry for posting twice. > I send my responses through nabble. Great, so you found the main problem already. So #1 does not seem to be an option; It is an option:

Re: [R] Repeating a function in R

2011-07-05 Thread Daniel Malter
Thanks, Uwe, for sending me this the second time. I send my responses through nabble. So #1 does not seem to be an option; #2 I sometimes forget. Regards, Daniel Uwe Ligges-3 wrote: > > On 02.07.2011 20:51, Daniel Malter wrote: >> You can just tell the function to create 1000 random numbers. Se

Re: [R] Repeating a function in R

2011-07-02 Thread Uwe Ligges
On 02.07.2011 20:51, Daniel Malter wrote: You can just tell the function to create 1000 random numbers. See ?runif for the specifics. The arguments are n, min, and max. 'n' is the one you are looking for. Thanks for providing help on R-help, but for the future please - respond to the OP rath

Re: [R] Repeating a function in R

2011-07-02 Thread Daniel Malter
If you want to repeat an entire function, use replicate as in replicate(15,sapply(1,function(x) runif(x))) Here, sapply(1,function(x) runif(x)) draws on uniformly distributed variable. replicate(15,...) is the wrapper function that tells to do this 15 times. The benefit here is that you can repli

Re: [R] Repeating a function in R

2011-07-02 Thread Daniel Malter
You can just tell the function to create 1000 random numbers. See ?runif for the specifics. The arguments are n, min, and max. 'n' is the one you are looking for. Da. -- View this message in context: http://r.789695.n4.nabble.com/Repeating-a-function-in-R-tp3640508p3640966.html Sent from the R h