Getting started with dplyr

To start off with, I will create an R script called dplyr_intro.R and set up my R environment. First, you should set your working directory to the ch7 project folder. Next, you should read the fuel economy dataset into a dataframe as follows:


The next step is to import the dplyr and tibble packages. In R, you can import a package using the library() function. The following lines import the dplyr package and the tibble package:


I will start with the select() function. The select() function allows you to select a certain number of columns ...

Get Practical Data Wrangling now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.