6 Packages

The first step in any analysis is to load the packages you will need for your analysis. Loading packages allows you to use powerful functions not included in “base” R.

For this analysis, you will use the tidyverse package, which actually loads a group of useful packages including tidyr, dplyr, readr, and ggplot2. tidyr and dplyr are very handy packages for manipulating data, readr is great for loading in data such as csv files, while ggplot2 is one of the best packages from plotting data. lubridate is another very handy package for dealing with dates and times.

If you haven’t done so yet, follow the instructions in the Installation section to load the tidyverse and lubridate packages which will be used in the example. You can then type the following lines into the console to load them into your current R session.

library(tidyverse) 
library(lubridate) 

The next few sections of this quick introduction to R will walk you through how to calculate some basic fisheries statistics and plot the results.