[R] R 1.9.0, special characters in variable names.

Ingolfsson, Olafur olafur.ingolfsson at imr.no
Thu Jun 24 09:59:49 CEST 2004


"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




More information about the R-help mailing list