Before we Start


Figure 1

Two images of a DMC Delorian: left is a standard model and on the right is one that has been modified into the time machine from 'Back To The Future'
RStudio extends what R can do, and makes it easier to write R code and interact with R. Left photo credit; right photo credit.

Figure 2

screenshot of RStudio with labels of the four panes as described below
R Studio

Figure 3

install packages pane showing an entry for installing the 'tidyverse' package
Click on the Packages tab in the Navigation Pane to download packages from CRAN.

Introduction to R


Starting with Data


Figure 1

Diagram of a Working Directory, with folders for data, data output, documents, fig output, and scripts

Figure 2

RStudio environment pane showing one object 'books' with 10000 observations of 12 variables
The books CSV loaded as a tibble in your R environment

Figure 3

A graphical depiction of a data frame. The first vector (column) is numeric; the second is character, and the third is logical.

Data cleaning & transformation with dplyr


Figure 1

Screen capture of window that says 'Select Me' with categories like Archival collections and Reference
Sub-Collection (formerly BCODE1) export from Sierra

Figure 2

Screen capture of window that says 'Select Me' with items like 'Archives' and 'E-Book'
Format (formerly BCODE2) export from Sierra

Data Visualisation with ggplot2


Figure 1


Figure 2


Figure 3


Figure 4


Figure 5


Figure 6


Figure 7


Figure 8


Figure 9


Figure 10


Figure 11


Figure 12


Figure 13


Figure 14


Figure 15


Figure 16


Figure 17


Figure 18


Figure 19


Figure 20


Figure 21


Figure 22

Three line plots, one each for general collection, juvenile, and K-12 sub-collection materials, showing the relationship of count of books to publication year

Figure 23


Figure 24


Figure 25


Figure 26


Figure 27


Figure 28