[R] R annoyances

Duncan Murdoch murdoch at stats.uwo.ca
Sat May 21 00:05:49 CEST 2005

Taylor, Z Todd wrote:
> On Friday, May 20, 2005 11:29 AM, Jari Oksanen wrote:
>>The most beautiful thing in old R (I started with 0.63) was 
>>that it was 
>>in the elegant unix tradition: all lower case and point (full stop, 
>>period, whatever) in places where you needed it. It is 
>>unfortunate that 
>>other languages are creeping in and old neat constructions 
>>are replaces 
>>with C++ style uGliNess. There was a grace period when switching from 
>>beautiful (fair) print.coefmat to ugLy printCoefmat, but some changes 
>>were more abrupt (package.description). I have a feeling that the 
>>recent trashing of names.dist (with a lot of code breakage 
>>even in base 
>>R) was caused by the same kind of political correctness.
>>Please Mr R, keep it like it used to be...
> BecauseIt'sFridayI'llJoinIntoThisTiredOldDebate.TheUseOfMixedCase
> UglinessToDistinguishBetween"Words"InObjectNamesIsIndeedAn
> Abomination.
> It_is_much_easier,_and_demonstrably_so_I_would_say,_to_use
> some_kind_of_real_separator_between_"words."
> S.and.R.have.historically.encouraged.a.different.separator
> than.most.other.languages,.but.the.principle.is.the.same.

Using an underscore will break old versions of R, and some versions of 

Using a dot will break S3 method dispatch.

Using mixed case will lead to complaints from people who don't mind 
breaking one of those things.

What's a package author to do??

I suggest that we redefine "+" to be a legal character in the name of an 
identifier.  Sure, if you used to have "a+b" you'll have to rewrite it 
as "+(a,b)", but think of the benefits! 

Duncan Murdoch
> And the double benefit is that it leaves case available for
> other good uses, such as indicating an object's scope:
>     local.var
>     Class.Data
> --Todd

More information about the R-help mailing list