[R] The use of period in function names and variable names

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Oct 4 06:30:06 CEST 2011


Hi,

On Tue, Oct 4, 2011 at 12:19 AM, Smart Guy <smartguy3k at gmail.com> wrote:
> Hi,
>     I am looking for some guidance on whether I can use the period(.) in
> function names and variable names.

Yes you can.

> For example:
>
> my.function.name <- function(my.data.variable, my.radius, my.another.var,
> my.value = 10)
> {
>
> }
>
> Will this pose any problems regarding older and current version of R.

Not really.

For the most part, you can use this pattern as you like. One thing to
keep in mind is that S3 method dispatch matches methods based on a
METHOD_NAME.OBJECT_CLASS pattern.

If you want to know more about the S3 stuff, you can start at ?UseMethod.

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the R-help mailing list