author: John M. Drake & Ana I. Bento date: autosize: true
Ebola or WNV mortality
R programs are called scripts
- Written in editor
- Handy tools like syntax highlighting and error checking
- Use # to indicate comments
Prototypical script
- Header (commented declaration of function, author, contact, date, and change log)
- Load libraries
- Declare functions
- Load data
- Analysis
Script is always evaluated in sequence
Wickham, H. 2010. A layered grammar of graphics. Journal of Computational and Graphical Statistics 19:3–28