Re: [R] underscores

From: Sarah Goslee <>
Date: Wed 14 Jun 2006 - 05:03:25 EST

Since several people have commented to me, on and off list:

On 6/13/06, Sarah Goslee <> wrote:

> >

> > PS Using underscores in variable names is not encouraged, and
> > can cause you problems in certain contexts.

I realize that it is now legal in R to use underscores, since they no longer represent the same thing as "->". But I don't consider "legal" the same as "encouraged", do you?

Probably the context most important is if you need to be able to share code with S-Plus. I work exclusively in R, but have academic colleagues who use S-Plus. As far as I know, S-Plus still restricts the use of "_", and for me, that possibility is enough to justify suggesting that people not use "_". I personally find that syntax hard to read, as well.

I don't consider it all that important an issue, especially as I know that many people disagree with me, and never use S-Plus, and don't care about appearance as long as it works. I would never have brought it up as an issue on its own, but did feel inclined to tack it on as a postscript to a question I did answer appropriately.

I shan't mention it again!


Sarah Goslee

	[[alternative HTML version deleted]]

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed Jun 14 06:16:08 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 14 Jun 2006 - 08:12:07 EST.

Mailing list information is available at Please read the posting guide before posting to the list.