I\'m a long time SAS programmer looking to make the jump to R. I know R isn\'t all that great for variable re-coding but is there a way to do this with do loops.
If
I suspect that if you have one hundred variables a_1, a_2, ..., a_100
, all of your variables are related. In fact, if you want to do
c_1 = a_1 + b_1
then a
, b
, c
are related. Therefore, I recommend that you combine all of your variables into a single data frame, where one column is a
and another is b
.
The question is how do you combine your variables in a sensible way. However, to give a useful answer, can you tell us how these variables are created?
Perhaps this isn't suitable, for your case. If not, a bit more information would be useful.