Brain dump of some import ideas

This commit is contained in:
hadley 2016-04-01 10:33:51 -07:00
parent 80db16f565
commit f7efc6ecb4
1 changed files with 26 additions and 9 deletions

View File

@ -7,12 +7,11 @@ library(readr)
## Overview
You can't apply any of the tools you've applied so far to your own work, unless you can get your own data into R. In this chapter, you'll learn how to import:
You can't apply any of the tools you've applied so far to your own work, unless you can get your own data into R. In this chapter, you'll learn how to:
* Flat files (like csv) with readr.
* Database queries with DBI.
* Data from web APIs with httr.
* Binary file formats (like excel or sas), with haven and readxl.
* Import flat files (like csv) with readr.
*
* Cache intermediate results in a fast file format like feather or RDS.
The common link between all these packages is they all aim to take your data and turn it into a data frame in R, so you can tidy it and then analyse it.
@ -245,10 +244,28 @@ The settings you are most like to need to change are:
* Parse these example files.
* Parse this fixed width file.
## Databases
## Other file formats
## Web APIs
* Excel: readxl
* SPSS: haven
* Stata: haven
* SAS: haven
## Binary files
Databases. All powered by the DBI package which provides a common interface.
Needs to discuss how data types in different languages are converted to R. Similarly for missing values.
* RPostgres
* RMySQL
* RSQLite
* Avoid JDBC un
Hierarchical:
* XML: xml2
* JSON: jsonlite
## Binary file formats
Feather.
RDS.