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

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Jun 24 10:07:52 CEST 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 related to your Windows setting / version.

I still get

  > data.frame(XX)
    a å ä ö æ ø
  1 1 2 3 4 5 6

using the german locales (german version of WinNT 4.0 SP6, R-1.9.1).

Uwe Ligges




More information about the R-help mailing list