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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.