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

Gabor Grothendieck ggrothendieck at gmail.com
Sun Feb 25 16:53:20 CET 2007

There is a fourth possibility too:

4. `scale colour`

I guess my preference is #1, #2, #3 and #4 in that order with #1 best.  Even
though #1 can conflict with S3 it usually does not and its historically what R
used so I usually just stay consistent with historical precedent.  #2 is
otherwise best and has the advantage of no conflict with S3.  #3 is too hard
to read due to the lack of spacing and is probably motivated by misguided
Java programmers.   The introduction of such names into R was and continues
to be a mistake in my opinion.  #4 takes up too much screen real estate and
the backquotes look too busy.

On 2/25/07, hadley wickham <h.wickham at gmail.com> 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?
> Thanks,
> Hadley
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list