[R] Double-banger function names: preferences and suggestions

Alberto Vieira Ferreira Monteiro albmont at centroin.com.br
Sun Feb 25 16:56:32 CET 2007

hadley wickham wrote:
> What do you prefer/recommend for double-banger function names:
>  1 scale.colour
>  2 scale_colour
>  3 scaleColour
> 1 is more R-like, but conflicts with S3.  2 is a modern version of
> number 1, but not many packages use it.  Number 3 is more java-like.
> (I like number 2 best)
> Any suggestions?
I always prefer 2, but this would make it non-portable to S-Plus. S-Plus
has a bug, where _ is the equivalent to <- (why would they do this? I
prefer to think it's stupidity and not villainy)

I guess most (if not all) functions in the libraries use 1.

Alberto Monteiro

More information about the R-help mailing list