[R] R 1.9.0, special characters in variable names.
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Thu Jun 24 09:25:32 CEST 2004
"Sixten Borg" <sb at ihe.se> writes:
> Hello all,
>
> I upgraded from R 1.8.1 to 1.9.0 (Windows XP), and spotted an odd thing.
>
> The last three letters in the Swedish alphabet are å, ä and ö. (In case they don't show correctly: they are a with a ring, a with two dots, and o with two dots (HTML: å ä ö).
>
> When I use these as variable names in a data.frame, odd things happen:
> In R 1.8.1, å (å) doesn't work while the others do.
> In R 1.9.0, ö (ö) doesn't work while the others do.
>
> Please find examples below. It would be nice if all three could be used in variable names. At least in Sweden :-)
I suspect this is an OS/locale issue rather than an R one -- we're at
the mercy of whatever the isprint function/macro returns for a given
locale. Works fine on Linux with LC_CTYPE=da_DK
> > data.frame(a=1, å=2, ä=3, ö=4)
> a å ä X.
> 1 1 2 3 4
> data.frame(a=1, å=2, ä=3, ö=4, æ=5, ø=6)
a å ä ö æ ø
1 1 2 3 4 5 6
(1.9.0 on RH8)
--
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