[R] Programming Concepts and Philosophy

Murray Jorgensen maj at stats.waikato.ac.nz
Fri Jun 20 04:35:03 CEST 2008


I am wondering if people on the list could recommend books that they 
have found helpful about programming concepts and style? I often find 
that students write R programs by copying existing code but could really 
benefit from the understanding of more general programming ideas. An 
example would be to avoid writing functions which attempt to modify 
their parameters. Another principle would be not to write programs with 
numbers used as constants but to assign them to named objects as in

n <- 120 # number of observations
p <- 10  # number of variables

near the beginning of a program rather than using "10" and "120" 
throughout the script.

This sort of stuff is not specifically R but can be a problem for 
students with little programming background.

I am happy to summarise responses.

Murray Jorgensen

-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz                                Fax 7 838 4155
Phone  +64 7 838 4773 wk    Home +64 7 825 0441    Mobile 021 1395 862



More information about the R-help mailing list