The R and RStudio Environments

Command line vs. script file

Project directory structure


Getting a session’s info

R Basics

The R command line environmnent

Data objects

Data types

Algebraic operations


Reading and Writing Data Files

Reading data tables

Exporting data files

Saving an R session

Loading an R session

Manipulating data tables

Importing and exploring a data table

Querying tables using base tools

Querying tables using dplyr

Reshaping data tables using reshape2

Mimicking Excel’s pivot operations

Plotting in R


Base plotting environment

lattice plotting environment

ggplot2 plotting environment


Case Study: Meteorological and Oceanographic Data


Tidying the data

Exploring the data