Skip to content
Back to formatted view

Raw Message

Message-ID: <AF942E31-558B-407C-9205-F034BBA24B8E@gmail.com>
Date: 2009-04-18T02:12:47Z
From: Brendan Morse
Subject: Loop question

Hi everyone, I am trying to accomplish a small task that is giving me  
quite a headache. I would like to automatically generate a series of  
matrices and give them successive names. Here is what I thought at  
first:

t1<-matrix(0, nrow=250, ncol=1)

for(i in 1:10){
	t1[i]<-rnorm(250)
}

What I intended was that the loop would create 10 different matrices  
with a single column of 250 values randomly selected from a normal  
distribution, and that they would be labeled t11, t12, t13, t14 etc.

Can anyone steer me in the right direction with this one?

Thanks!
Brendan