1 Introduction to dplyr
1.1 What is dplyr?
“A Grammar of Data Manipulation: a fast, consistent tool for working with data frame like objects, both in memory and out of memory.”
“A grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges”
“A part of the tidyverse meta-package and, as a core package, it is among those loaded via
library(tidyverse)
”.
Practice 1
In order to be able to use the functions from the dplyr
package, let’s (install and) load it first.
Input
if(!require(tidyverse)) # checks if package can be loaded
{ # if not, install and then load
install.packages("tidyverse") # install package
library(tidyverse) # load package
}
Click here for outputs
If package already installed and can be loaded:
If package not installed:
1.2 Tidy data and pipes
Figure Source: dplyr Cheat Sheet
This page is meant to introduce the dplyr package briefly and get you ready move on to learn functions from dplyr.
A pause here for questions.