[S] growing matrices

Fei Chen (fchen@stern.nyu.edu)
Sat, 19 Sep 1998 19:28:44 -0400 (EDT)


hi all,
i was wondering if there is a way to grow matrices dynamically without
using rbind()? which exhausts my memory after some number of loops.

i have a function, say, myfun(), that returns a matrix with a fixed number
of columns but variable number of rows, i'm doing this now:

all.mat_c();
for(i in 1:8000)
all.mat_rbind(all.mat,myfun());

would this be any different/better?

all.mat_c();
for(i in 1:8000)
{
tmp.mat_rbind(all.mat,myfun())
all.mat_tmp.mat
}

thanks for any help,

fei

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news