search for: surv_1

Displaying 1 result from an estimated 1 matches for "surv_1".

Did you mean: surv_
2009 Aug 13
2
How to rename columns that start with numbers?
Hello, My dataframe has new columns that start with the number 1 or 2 (resulting from a reshape cast command). Instead of having these columns automatically renamed by R so start with the letter X, I would like to rename these columns to start with the characters "SURV_" (e.g., SURV_1, SURV_2). I can't seen to use grep() to identify and rename the columns starting with either 1 or 2. Any help would be much appreciated, thanks! (I know I could rename these manually, but the above is a simpler statement of the actual problem, which involves several dozen columns, so that...