Chapter 11 How to Read Data

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

11.1 Introduction

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


11.3 Labelled data

In particular, survey data

11.4 R readers

11.5 {readr}

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

11.5.1 {rio}

package

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

vignette: Import, Export, and Convert Data Files

11.5.2 {googledrive}

package

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

tidyverse page: googledrive

11.5.3 {foreign}

package

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

articles

11.5.4 {haven}

package

articles

11.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)”).

11.7 Stata files

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

11.7.2 {readstata13}

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

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

11.8 Time series database files