Hi all,
I am looking to recode a large number of variables, and figure I can probably use some sort of loop to do so. What throws me is how to programmatically name each variable (I just want to keep the var name and append ".rc".
Here is an example. Lets say I have a set of variables, var.1 to var.5. I am looking to create a new variable in my dataframe that is var.1.rc <- var.1 / sum(var.1 to var1.5). Ill do the same for the next variable, and so on.
I am new to R but this would be a HUGE step forward for me.
Is it possible. Best ways to do it? Any help will be much appreciated!
Regards,
Brock