Installing and loading packages

Installing packages

Packages are collections of R functions, data, and compiled code in a well-defined format. The directory where packages are stored is called the library. R comes with a standard set of packages. Others are available for download and installation. Once installed, they have to be loaded into the session to be used. For most data wrangling processes, we will tidyverse and agricolae packages. We will first install these packages. Remember to put quotation marks (“ “) or (‘ ‘) around the package name.

install.packages("agricolae")
install.packages('tidyverse')

tidyverse tidyverse is an opinionated collection of R packages designed for data science including dplyr, ggplot2, tidyr, etc.. All packages share an underlying design philosophy, grammar, and data structures. agricolae package contains functionality for the Statistical Analysis of experimental designs applied specially for field experiments in agriculture and plant breeding.

Loading packages

Installation of packages need to be done only once, after which we can load the packages that are installed by typing:

library(agricolae)
library(tidyverse)

Quotation marks (“ “) or (‘ ‘) are not required while loading packages.

<– Click here to go to the previous tutorial                         Click here to go to the next tutorial –>