[R] R 1.9.0, special characters in variable names.
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jun 24 10:20:55 CEST 2004
On Thu, 24 Jun 2004, Ingolfsson, Olafur wrote:
> "Sixten Borg" <sb at ihe.se> writes:
> When I use these as variable names in a data.frame, odd things happen:
> > data.frame(a=1, å=2, ä=3, ö=4)
> > a å ä X.
> > 1 1 2 3 4
> ----
> I your variables only include numbers (or only characters), this works
>
> XX <- cbind(a=1, å=2, ä=3, ö=4, æ=5, ø=6)
> > XX
> a å ä ö æ ø
> [1,] 1 2 3 4 5 6
> But this doesn't
> > data.frame(XX)
> a å ä X. Xæ X.
> 1 1 2 3 4 5 6
>
> i.e. it is the data.frame function that manages to mess up the variable
> names for us Windows users
No. It is your OS that is at fault, plus the user who did not think
to use check.names=FALSE to work around the problems of his machine.
Can we stop blaming R for things which are not its fault, especially as
that has already been pointed out twice this morning?
--
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
More information about the R-help
mailing list