R Fundamentals I

Introduction to R for non-programmers

R is one of the most widely used scripting tools for data analysis and visualization. In addition to its core capabilities, it is organized around libraries (or packages), which there are currently over 16,000 of them, offering almost limitless possibilities in processing, analyzing and visualizing data. Read for example Christy’s blog post.

This module covers an introduction to R, from basic data structures to simple graphs. You will learn how to load external datasets, extract, transform and summarize data, as well as how to quickly visualize simple relations in the data. This module is for beginners or for those who want to refresh their knowledge in R basics.

Date: 11-17-2020

Instructor: Hana Ševčíková

Assistents: Christy Lam, Suzanne Childress, Polina Butina

Prerequisites

Please have R and RStudio installed before the course:

  1. Install R from CRAN:
    • At the top of the page there are three links where you select your operating system.
    • If you clicked on “Download R for Windows”, now click the “base” link. Next, click “Download R 4.0.3 for Windows” which downloads the installer. Run the installer.
    • If you chose “Download R for (Mac) OS X”, click the “R-4.0.3.pkg” link. An installer will download to guide you through the installation process.
  2. Install RStudio Desktop.

Create a directory for this class, say “R-basics-I”. Download data and unzip it into the newly created directory.

Topics

  1. Introduction to R and RStudio
  2. Data structures
  3. Data frames and reading in data
  4. Subsetting data
  5. Vectorisation
  6. Data manipulation and simple plots
  7. Homework

Other Resources



Back to all modules