[R] RMySQL and '_' character in column names
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Thu Oct 30 22:35:37 CET 2003
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
> ?make.names may help.
Or backtick quoting in 1.8.0 (which this is clearly not since _ now
gives a syntax error).
> On Thu, 30 Oct 2003, Xavier Fernández i Marín wrote:
>
> > 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?
>
> --
> Brian D. Ripley, ripley at stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list