Skip to content
Prev 260205 / 398502 Next

R Style Guide -- Was Post-hoc tests in MASS using glm.nb

This is the first time I've seen an R Style Guide.  I will admit that I
haven't looked for one previously, but nevertheless I still haven't seen
one. My code style simply evolved (perhaps, chugged along) by reading posts
from other users who post to the r-help community.

I regularly program with a colleague who is a Java software development
specialist, hacking together code that we both develop.   Since his coding
style differs substantially from mine and the conventions described for R
we end up modifying my code to follows his convention.  For example, he
typically likes to name variables in this form: "variable_" , which the
guide frowns on.

I think this guide will be very helpful.  First for me to become more
proficient and conventional following R stylistics.  Secondly, he will see
why R users do things the way R.  The guide should be helpful.

I appreciate you posting the link to the guide. Much appreciated.

Steve

Steve Friedman Ph. D.
Ecologist  / Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034

Steve_Friedman at nps.gov
Office (305) 224 - 4282
Fax     (305) 224 - 4147


                                                                           
             Bert Gunter                                                   
             <gunter.berton at ge                                             
             ne.com>                                                    To 
             Sent by:                  Bill.Venables at csiro.au              
             r-help-bounces at r-                                          cc 
             project.org               r-help at r-project.org                
                                                                   Subject 
                                       [R] R Style Guide -- Was Post-hoc   
             05/18/2011 09:47          tests in MASS using glm.nb          
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Thanks Bill. Do you and others think that a link to this guide (or
another)should be included in the Posting Guide and/or R FAQ?

-- Bert
On Tue, May 17, 2011 at 4:07 PM, <Bill.Venables at csiro.au> wrote:
perfect, but a thoughtful contribution on these kinds of issues, has
avoiding attach() as its very first line. ?See
http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html)
within(...), a companion of with(...) in a way, but used for modifying data
frames or other kinds of list objects. ?It should be seen as a more
flexible replacement for transform() (well, almost).
for variables, and returns *the evaluated expression* as the result. ?By
contrast
'expr', but now 'expr' is used to modify the varibles in 'data' and returns
*the modified data set* as the result.
which is usually the longest, trickiest, most important, but least
discussed aspect of any data analysis project.
one step with transform():
On Behalf Of Bert Gunter
http://www.R-project.org/posting-guide.html
http://www.R-project.org/posting-guide.html
--
"Men by nature long to get on to the ultimate truths, and will often
be impatient with elementary studies or fight shy of them. If it were
possible to reach the ultimate truths without the elementary studies
usually prefixed to them, these would not be preparatory studies but
superfluous diversions."

-- Maimonides (1135-1204)

Bert Gunter
Genentech Nonclinical Biostatistics
467-7374
http://devo.gene.com/groups/devo/depts/ncb/home.shtml

______________________________________________
R-help at r-project.org 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.