Skip Navigation

R Primer

Overview and Getting Started

About This Primer

This primer comprises a sequence of instructional videos and R notebooks covering:

  • How to install R and several integrated development environments on various computer systems,
  • An introductory guide to the R language.

The table of contents below provides links to open the notebooks in Google Colab (from which they can also be downloaded), and to open the videos in the TAMIDS YouTube channel.

This primer was created by Matt Hielsberg for the Texas A&M Institute of Data Science

Quick Start Guide for Learning R Without Any Software Installation

Learning Objectives For This R Primer

After completing this primer you should be able to do the following

  • Create and manage R projects using the R console, RStudio, RStudio Cloud, Google Colab, and Jupyter Notebook
  • Use the built-in help system to find details on functions, packages and data sets
  • Write and evaluate expressions using variable names
  • Understand name resolution and conflicts
  • Use basic data structures including vectors, lists, factors and data frames, among others.
  • Understand and use various control flow mechanisms, and how to replace looping structures using apply
  • Write functions, understand argument lists, use named and unnamed arguments including default values
  • Understand and utilize short-circuit and lazy evaluation
  • Find, install and load packages from CRAN
  • Read/Write basic custom data files
  • Visualize data using ggplot and other plotting tools

R Systems and Installation Guide

Chapter 1: Background and Installation

SectionTopicNotebook / ColabVideos
1.1BackgroundOpenVideo (4:01)
1.2.1Installation: IntroductionOpenVideo (3:19)
1.2.2Installation: Google CollaboratoryVideo (3:23)
1.2.3Installation: RStudio CloudVideo (2:30)
1.2.4Installation: R MacOSVideo (1:59)
1.2.4Installation: R UbuntuVideo (3:19)
1.2.4Installation: R Windows 10Video (1:59)
1.2.5Installation: Jupyter MacOSVideo (5:09)
1.2.5Installation: Jupyter UbuntuVideo (4:12)
1.2.5Installation: Jupyter Windows 10Video (2:15)
1.2.6Installation: IRKernel MacOSVideo (4:02)
1.2.6Installation: IRKernel UbuntuVideo (2:04)
1.2.6Installation: IRKernel Windows 10Video (2:02)
1.2.7Installation: Anaconda MacOSVideo (2:07)
1.2.7Installation: Anaconda UbuntuVideo (3:07)
1.2.7Installation: Anaconda Windows 10Video (2:04)
1.2.8Installation: RStudio MacOSVideo (1:47)
1.2.8Installation: RStudio UbuntuVideo (2:28)
1.2.8Installation: RStudio Windows 10Video (1:30)

Chapter 2: Getting Started with R Interpreter

SectionTopicNotebook / ColabVideos
2.1The R InterpreterOpenVideo 1 (4:02)
2.2Getting Started With ScriptsOpenVideo 1 (4:13)
2.3Guidelines/Good PracticesOpenVideo 1 (5:10)

Chapter 3: Getting Started with Integrated Development Environments (IDEs)

SectionTopic Notebook / ColabVideos
3.1 Jupyter NotebookOpen Video 1 (10:10)
3.2Google ColabOpenVideo 1 (7:31);
Video 2 (5:53)
3.3RStudio DesktopOpenVideo 1 (14:02)

R Language Guide

Chapter 4: Introduction

SectionTopicNotebook / ColabVideos
4.1Getting Help in ROpenVideo 1 (4:02);
Video 2 (2:53)
4.2CalculatorOpenVideo 1 (4:13);
Video 2 (2:30)
4.3Variables, Assignments
& Statements
OpenVideo 1 (5:10); Video 2 (3:27); Video 3 (2:21); Video 4 (5:25)

Chapter 5: Data Structures

SectionTopicNotebook / ColabVideos
5.1Vectors, Sequences, and IndexingOpenVideo 1 (9:45); Video 2 (6:50); Video 3 (11:32)
5.2Character Vectors and StringsOpenVideo 1 (9:03)
5.3ListsOpenVideo 1 (6:28)
5.4MatricesOpenVideo 1 (9:19); Video 2 (8:59)
5.5FactorsOpenVideo 1 (6:04)
5.6Data FramesOpenVideo 1 (9:23); Video 2 (5:45); Video 3 (7:29)

Chapter 6: Control Flow

SectionTopicNotebook / ColabVideos
6.1Control FlowOpenVideo 1 (9:43);
Video 2 (12:30)
6.2FunctionsOpenVideo 1 (13:15); Video 2 (8:41); Video 3 (9:37)
6.3ApplyOpenVideo 1 (16:44)

Chapter 7: Packages

SectionTopicNotebook / ColabVideos
7.1PackagesOpenVideo 1 (14:09);

Chapter 8: Data

SectionTopicNotebook / ColabVideos
8.1DataOpenVideo 1 (13:40); Video 2 (13:47); Video 3 (10:27)