Skip to content
Back to formatted view

Raw Message

Message-ID: <1330416879914-4427385.post@n4.nabble.com>
Date: 2012-02-28T08:14:39Z
From: mrzung
Subject: macro function

hi, 

I know how to use the "for" loop function like: 

for(i in 1:ncol(mat)){ 
mat[i]<-b[i,2] 
} 

but, in this case 

r1<-b[1,1] 
r2<-b[2,1] 
r3<-b[3,1] 
r4<-b[4,1] 

* 
* 
* 

r3002<-b[3002,1] 
r3003<-b[3003,1] 

- must make vectors 

how should I make a efficient code for that? 

Is there anything in R like SAS MACRO function? 

--
View this message in context: http://r.789695.n4.nabble.com/macro-function-tp4427385p4427385.html
Sent from the R help mailing list archive at Nabble.com.