Chapter 12 How to Read Data

You’ve got some data, now you need to get it into your R environment.

12.1 Introduction

12.2 Databases

Databases using R – from RStudio

John David Smith, Sophie Yang, M. Edward (Ed) Borasky, Jim Tyhurst, Scott Came, Mary Anne Thygesen, and Ian Frantz, 2020-01-27, Exploring Enterprise Databases with R: A Tidyverse Approach

R database interfaces, Burns Statistics


12.3 Labelled data

In particular, survey data

12.4 R readers

12.5 {readr}

Alison Hill (2018-07-07-8) Read Data with Multiple Header Rows into R

12.5.1 {rio}

package

CRAN page: currently only development version, see tidyverse link below

vignette: Import, Export, and Convert Data Files

12.5.2 {googledrive}

package

CRAN page: currently only development version, see tidyverse link below

tidyverse page: googledrive

12.5.3 {foreign}

package

CRAN page: foreign: Read Data Stored by Minitab, S, SAS, SPSS, Stata, Systat, Weka, dBase, …

articles

12.5.4 {haven}

package

articles

12.6 PDF files

Luis D. Verde, 2018-12-14, Tidyeval meets PDF table hell – great solution to the common problem of broken rows (“values that are broken up into two lines for whatever reason (often to optimize space on a page in a table in a typeset pdf)”).

12.7 Stata files

12.7.1 {read.dta}

Reads a file in Stata version 5–12 binary format into a data frame.

CRAN page: read.dta: Read Stata Binary Files

12.7.2 {readstata13}

Function to read and write the ‘Stata’ file format.

CRAN Page: [readstata13: Import ‘Stata’ Data Files](readstata13: Import ‘Stata’ Data Files)

12.8 Time series database files