[R] RMySQL and '_' character in column names

Xavier Fernández i Marín xavier.fim at eresmas.net
Thu Oct 30 17:54:50 CET 2003


Hi,

I'm using RMySQL in order to obtain data from my MySQL server. In my databases 
sometimes I have columns with names that contain '_' character (ex: 
'gdp_capita', 'population_total', etc...). When these names appear as the 
names of the vectors in the data frame that I get, sometimes I have problems 
as:

> cor(gdp_capita, population_total)
Error: object "_capita" not found
use of _ is soon to be removed.

Is there an automatic way to transform the '_' characters in MySQL to '.' in R 
using RMysql?

Thanks,

Xavier




More information about the R-help mailing list