Table of Contents»
Ching-Ti Liu, PhD, Associate Professor, Biostatistics
Jacqueline Milton, PhD, Clinical Assistant Professor, Biostatistics
Avery McIntosh, doctoral candidate
This module will build additional skills in R programming by going beyound simple commands.
- R as a programming language
- Grouping, loops and conditional execution
- Creating your own functions
By the end of this session students will be able to:
- Perform simple data manipulations: vectors (numeric, logical, character), missing values, index vectors, many-to-one, one-to-many merging
- Use grouped expression and if-else statements:
- Know how to write your own functions
- Reading in huge datasets: http://simplystatistics.org/2011/10/07/r-workshop-reading-in-large-data-frames/
- Web Scraping: http://thebiobucket.blogspot.com/2011/10/little-webscraping-exercise.html
- Sorting: use command sort(), e.g.
> sort( c(1,55,-2,11) )
 -2 1 11 55
- Generating a random permutation of a set of data:
> sample(c("First","Second","Third","Fourth"), replace=F)
 "Fourth" "First" "Third" "Second"