[R] how to convert 450 columns in a dataframe from numberic to character, but leave other columns unchanged?

zhongmiao wang zhongmiao at gmail.com
Sat Apr 22 08:52:06 CEST 2006

I can do it seperately, but there must be a method to convert the 450
columns together?
By the way, Can R write a seriers of variable names in a short way,
such as X1-X450?
I can extract the 450 columns out and convert them to a character
matrix, however, when I combined it back, they turned back to numberic
automatically. I can also use I() function to preserve them as
character, however, the column names cannot be used to create formular
for further calculation. How to resolve this problem?

Thank you so much!
Zhongmiao wang

More information about the R-help mailing list