Loading data for use in dplyr

Loading the data can be performed using whichever data import function you prefer. Personally, I almost always use fread but the read.*-family of functions will work just fine. But it seems the most popular for most tidyverse-ers is to use the read_*-family of functions from the readr package.

It can be looked at like this: fread is to data.table as the readr import functions are dplyr/tidyverse. This analogy holds for two main reasons: (a) each method, by default, returns a special type of data.frame that is optimized in various ways to the functionality of the respective packages, and (b) the use of the import alternative is not strictly necessary but often helpful for speed.

On the former point, the object ...

Get Data Analysis with R - Second Edition 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.