Chapter 2 Loading R Packages

The functionalities of some packages may require updated versions of R and RStudio. To avoid errors, please ensure you are using the most recent releases of R and RStudio, and update your R packages.

update.packages()                         

2.1 Installing naturecounts

You can install naturecounts from GitHub with the remotes package:

install.packages("remotes")
remotes::install_github("BirdsCanada/naturecounts")

After installation, you need to load the package each time you open a new R session.

library(naturecounts)

2.2 Additional packages

Throughout the book we use the tidyverse R package, which is actually a collection of R packages for data science, including tidyr, dplyr, and ggplot2, among others. The tidyverse package can be installed from CRAN and loaded into R as follows:

install.packages("tidyverse") 
library(tidyverse) 

You may find additional packages are needed to manipulate and visualize your data. For example, if you are interested in Mapping Observation a suite of packages need to be installed and loaded. The process is similar to that previously describe.