[R] Naming conventions for R?

Peng Yu pengyu.ut at gmail.com
Fri Dec 4 03:46:58 CET 2009


On Thu, Dec 3, 2009 at 8:27 PM, Sharpie <chuck at sharpsteen.net> wrote:
>
>
> pengyu.ut wrote:
>>
>> There are documents for naming conventions for other languages. I'm
>> wondering if there is a document that clearly describes the
>> recommended naming convention for R.
>>
>
>
> You should browse this thread:
>
>  http://n4.nabble.com/Google-s-R-Style-Guide-td901694.html#a901694
>
> It was a pretty thorough discussion of style different guides for R.

Why variables has to be of the form some.variable but not some_variable?

I have my local convention of having the file names and the variable
names following the same convention, for the reason that I may save a
variable in a file and it is easier to find the variable if the
variable and the file name follow the same convention. For example,

save(list='x_x_x', file='x_x_x.RData')

I other programming language like C++, there is no confusion
introduced by having the same convention on file names and variables.
I'm wondering why a different convention is chosen for R.




More information about the R-help mailing list