Converting rectangular data into R with the readr R package

Tabular data, or flat rectangular data, comes in many different formats, including CSV and TSV. R's readr package provides an easy and flexible way to import all kinds of data into R. It also fails gracefully if there are issues with the data you are trying to import. You can load the readr package with the following command:

library(readr)

The simplest way to import data with readr package is to call the specific read data function for different file types, depending on the data you are reading. For example, in the following screenshot, we have a CSV file containing data about automobiles. This data is also bundled as an example dataset with the readr package, as shown in the following ...

Get Hands-On Exploratory Data Analysis with R 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.