R 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,a 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
- Obtain a Google account if you don’t already have one; this is needed to run Google Colab. When opening each notebook, you may need to agree to run the content when prompted by Colab.
- Watch the background video and open the accompanying notebook in Colab (as listed also in Section 1.1 below) for some basic information on the R language and a list of further resources.
- Skip down below to the R Language Guide and start at Chapter 4
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
Chapter 1
Background and Installation
R Systems and Installation GuideSection 1.1
Background and Installation
Section 1.2.1
Installation: Introduction
Section 1.2.2
Installation: Google Collaboratory
Section 1.2.3
Installation: RStudio Cloud
Section 1.2.4
Installation: R
Section 1.2.5
Installation: Jupyter
Section 1.2.6
Installation: IRKernel
Section 1.2.7
Installation: Anaconda
Section 1.2.8
Installation: RStudio
Chapter 2
Getting Started with R Interpreter
R Systems and Installation GuideSection 2.1
The R Interpreter
Section 2.2
Getting Started With Scripts
Section 2.3
Guidelines/Good Practices
Chapter 3
Getting Started with Integrated Development Environments (IDEs)
R Systems and Installation GuideSection 3.1
Jupyter Notebook
Section 3.2
Google Colab
Section 3.3
RStudio Desktop
Chapter 4
Introduction
R Language GuideSection 4.1
Getting Help in R
Section 4.2
Calculator
Section 4.3Variables, Assignments
Variables, Assignments
& Statements
Chapter 5
Data Structures
R Language GuideSection 5.1
Vectors, Sequences, and Indexing
Section 5.2
Character Vectors and Strings
Section 5.3
Lists
Section 5.4
Matrices
Section 5.5
Factors
Section 5.6
Data Frames
Chapter 6
Control Flow
R Language GuideSection 6.1
Control Flow
Section 6.2
Functions
Section 6.3
Apply
Chapter 7
Packages
R Language GuideSection 7.1
Packages
Chapter 8
Data
R Language GuideSection 8.1
