[R] Replacing underscore character in Windows GUI

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Aug 13 07:02:50 CEST 2003

On 12 Aug 2003, Douglas Bates wrote:

> "nels.tomlinson.1" <tomlinso at purdue.edu> writes:
> > I'd like to propose that now that the underscore-as-assignment-operator
> > is to be removed from R (good thing, too), that the Windows GUI should
> > replace the underscore ``_''  with the proper assignment operator ``<-''
> > when you type in the underscore character.
> > 
> > This is the current default behaviour in the ESS mode in emacs, and seems
> > to me to be a generally good idea.  If no one can come up with a good
> > reason not to do this, I hope that the maintainers of the GUI will put it
> > on their to-do list.
> One of the purposes of deprecating then disallowing the underscore as an
> assignment character is to allow its use in names.

And it is already valid in character strings and inside quoted (including
by backslashes) non-syntactic names.  The GUI frontend would need to parse
its input to reliably substitute -- ESS does try to do that, but I don't
think it is 100% successful.  (It doesn't know about backticks, at least 
in the version I have installed, for example.)

In short: this would be days of work to do right, so it is not going to 

> I hope that the maintainers of the GUI will put it
> on their to-do list.

That's not the best response. `Here is a set of patches for you to
consider' is more likely to succeed.  Take a look at the R start-up banner 
and aspire to becoming one of those contributors!

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