Summer Institute in Statistical Genetics
|
||
Module 6: Advanced R Programming for Statgen package development
Instructors: Thomas Lumley and Ken Rice
This page will feature slides from our sessions, exercises for you to complete, and their solutions. Prior to the module, please install an up-to-date version of R on the laptop you will use during the summer institute. R is available from this site. Tools for calling C from R - for sessions 7/8
Slides and exercises
Script files are posted following each session; these will contain our R code for the exercises. Many exercises will be open-ended - and have many different solutions; the code posted here illustrates possible approaches. Session 1 Introductions, graphics (R code for color wheels and boxes in the slides) (Exercises: .docx, .pdf) (R script file) Session 2 Simulation, debugging, timing (Examples of timing and profiling) (Exercises: .docx, .pdf) (R script file) Session 3 Object Systems (No exercises for this session) Session 4 Lab exercise (Exercises: .docx, .pdf) (R script file) Session 5 Packages (Exercises: .docx, .pdf) If you don't have code for Session 4's exercise, cut and paste just the functions from this script file.
Session 6, XML (SVG Funnel plot example) (Exercises: .docx, .pdf). If you don't have Google Earth installed but do have internet access and a Google account, you can upload your KML file to Google's My Maps feature. (R script file) Session 7, Embedding C code (R script for the convolve example, including some Command Line commmands; it uses convolve.c. See also R script for the convolve example using .Call, which uses convolve2.c - no exercises for this session). Session 8, Lab exercise (Exercises: .docx, .pdf) (R script file) Session 9, Handling large datasets (no exercises for this session) (Example featuring RSQLite which uses the newexample.db database file) Session 10, Lab exercise (Exercises: .docx, .pdf) (R script file) Datasets and other files for exercises
Other resources
|
||
Send mail to: see Thomas or Ken in class
|