[R] Loop for in R to generate several variables

arpino bruno.arpino at unibocconi.it
Mon Apr 7 11:31:57 CEST 2008


Hi everybody,
I have to create several variables of this form:

Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n

where ind varires in {1,...,10}

I thought to this loop for but it does not work:

for (ind in 1:10) {

 Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n


	}

Any suggestions?

Thank you.


-- 
View this message in context: http://www.nabble.com/Loop-for-in-R-to-generate-several-variables-tp16536683p16536683.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list