Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


R intro workshop

Planned for late Sept/early Oct 2016 at UofA.


  • ABMI-ers
  • BAM affiliates
  • Students from Boutin/Bayne labs
  • Other interested colleagues.


Basic level programming is assumed, but we'll run over the basics (and it will be part of the handout). Some table/database knowledge is also assumed.

What to bring

Bring a laptop with charger (WiFi capability is good to have, but will have USB drives etc around).

Feedback required

Feedback before the workshop is useful to fine-tune some of the specifics of the course:

  1. Have you ever used any scripting languages or command line tool? (Yes/No)
  2. Have you ever used R? (Yes/No)
  3. What OS do you use most often for work? (Windows/OS X/Linux/Other)


  • We will use R (command line and Rstudio)
  • ODBC and database connections, depending on preferred platform for participants (probably MS Excel/Access, but setting up connections is outside of the scope)
  • Some text editor (Atom, Notepad2, Notepad++, TextWrangler, Crimson Editor, Rstudio, R GUI built in editor, etc)

Audio-visual equipment for the room

  • Projector and VGA chords
  • Power outlets
  • Whiteboard and markers


Morning (9-12): R programming basics

  • Navigating the jungle (search tools, help, demos, vignettes, task views, examples, mailing lists)
  • Installing libraries
  • Data types and structures
  • I/O (reading and writing data), maybe database connections and queries
  • Understanding basic behaviours (indexing, droping, recycling, factors, names)
  • Programming constructs (loops)
  • Functions, object-oriented programming concepts (classes, methods)
  • Repeated function calls in loops and in vectorized expressions (apply)

Afternoon (13-16): high performance computing

  • Manipulating big data: long and wide formats (pivot tables, dense vs. sparse representations)
  • Checking data, summaries
  • Aggregating big tables, summarizing proportional data (e.g. percent cover)
  • Manipulating factor levels
  • Manipulating attributes (gsub, grep, substr, strsplit, nchar)
  • Combining tables (merge operations, filtering, matching, subsetting)
  • Using multiple cores (mostly focusing on socket clusters, touching forking and shared memory applications briefly): distributed computing concepts
  • Running scripts from command line (batch files, or basic shell scripts -- depending on OS preferences)

If time allows, we might consider some of the following topics:

  • Basic plotting capabilities in R
  • Generating reports using R markdown, knitr, and Rstudio


Record the workshop if possible (screen capture + another camera).