Link Search Menu Expand Document

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.”

R document (r-project.org)

“A grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges”

dplyr (tidyverse.org)

“A part of the tidyverse meta-package and, as a core package, it is among those loaded via library(tidyverse)”.

Introduction to dplyr in STAT 545

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

implicit

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.