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

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jun 24 09:12:51 CEST 2004


This is a function of the OS set by your locale, and there is nothing we
can do about it.  It is done by the C call isalpha in do_makenames in
src/main/character.c.

My Windows XP machine in Swedish does accept all three, using the 
CRAN-compiled version of rw1091.exe, so something is up with yours.  
Sorry, can't help.

On Thu, 24 Jun 2004, Sixten Borg wrote:

> 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 :-)
> 
> Thanks...
> Sixten.
> 
> #
> # R 1.9.0: ö is renamed to X.
> #
> 
> > data.frame(a=1, å=2, ä=3, ö=4)
>   a å ä X.
> 1 1 2 3  4
> > version
>          _              
> platform i386-pc-mingw32
> arch     i386           
> os       mingw32        
> system   i386, mingw32  
> status                  
> major    1              
> minor    9.0            
> year     2004           
> month    04             
> day      12             
> language R              
> > 
> 
> 
> #
> # R 1.8.1: å is renamed to X.
> #
> 
> > data.frame(a=1, å=2, ä=3, ö=4)
>   a X. ä ö
> 1 1  2 3 4
> > version
>          _              
> platform i386-pc-mingw32
> arch     i386           
> os       mingw32        
> system   i386, mingw32  
> status                  
> major    1              
> minor    8.1            
> year     2003           
> month    11             
> day      21             
> language R          
> 
> 
> #
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
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