[R] Printing a variable in a loop

kat_the_great knv4 at hotmail.com
Thu Jun 28 15:42:06 CEST 2012


Thanks for your reply Jon. 

I need to actually do more than print the name of the variable (I just made
the example simpler). I need to manipulate var_1, var_2 etc. but setting
values of NA to 0. 

 So as you said, "1. if you want to "display" the variable, just type it 
>var_1
"

But how do I do this in a loop where the  number portion of var is the
counter in the loop?

Thanks!
Kat

--
View this message in context: http://r.789695.n4.nabble.com/Printing-a-variable-in-a-loop-tp4634673p4634754.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list