[S] is there a cumouter() like function?

Fei Chen (fchen@stern.nyu.edu)
Sun, 23 Aug 1998 12:51:23 -0400 (EDT)


hi all,

i'm trying to do the following, is there a way to avoid the loop?

a_matrix(rnorm(30),10,3) # some random N x 3 matrix
b_matrix(0,3,3)
for(i in 2:10)
b_b+a[i-1,]%o%a[i,]

it seems this sort of question is often asked, but i couldn't find an
answer on the s-news archive.

thanks, fei

ps. can someone give me an example of unavoidable loop? and under what
general conditions when this happens?

-----------------------------------------------------------------------
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