O'Reilly logo

Data Analysis with R - Second Edition by Tony Fischetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required