This section will cover a brief introduction to R and RStudio, some base R topics, and recommendations for adopting a style guide for R.

Data

Download the gapminder data used for the lessons here (right-click & save link as…)

Lessons

  1. Introduction to R and RStudio
  2. Data Structures
    • How can I read data in R?
    • What are the basic data types in R?
    • How do I represent categorical information in R?
  3. Exploring Data Frames
    • How can I manipulate a data frame?
  4. Subsetting Data
    • How can I work with subsets of data in R?

Code Style Guide

In programming as in writing, it is generally a good idea to stick to a consitent coding style. There are two style guides that you can adopt or customize to create your own:

Resources

Additional base R lessons can be found here, courtesy of Software Carpentry, and cover the following additional topics that will not be covered in Part I of this workshop:

  • Control flow
  • Vectorization
  • Functions
  • Writing good software