[R] Posterior use of iterations output in a for() loop

Duarte Viana viana.sptd at gmail.com
Tue Aug 18 17:37:40 CEST 2009

Dear all,

Please apologyse if this is too simple. I am a beginner.
I am trying to extract the resulting output of each iteration in a
for() loop in order to concatenate them and make an histogram out of



# function to obtain 2 (length of "a") vectors, each corresponding to
b<=a (b<=5 and b<=8)
     for(y in y){

fun(a,b) #result

Question: I want to concatenate the resulting vectors (the "5" and the
"9") to make an histogram. I could just copy and paste them, but I
want to do this with thousands of vectors (each one resulting from an
iteration, which can be a vector of potential enormous length).

I would really appreciate some help.


Duarte Viana

More information about the R-help mailing list