[R] (no subject)
landronimirc at gmail.com
Mon Feb 15 22:33:39 CET 2010
You are more likely to get help if you provide a subject more
informative than "no subject".
On 2/15/10, hussain abu-saaq <hussainib1 at hotmail.com> wrote:
> is there a good notes for loops(if else and while) in r.
Check this , but also the R manuals .
> I have a code written in Matlab and I tried to rewrite it in R but it does not give me the write result . for example in matlab the result is (1 2 3 4)
> In r it is give my only 2
Can you give an example that we can reproduce? This one is too vague
to be of any help.
> One more question if I have variable,lets say x and I use it in a loop and I update x each time in the loop . How can I get a vector for all X's.
> x <- NULL
> for(i in 1:10) x[i] <- mean(rnorm(100))
 -0.0045593 0.1730067 0.0395593 0.0232542 -0.0195095 -0.0475081
0.2062105 0.0104414 0.0119292 -0.0011240
More information about the R-help