diff --git a/import.Rmd b/import.Rmd index b8d8398..f29f90d 100644 --- a/import.Rmd +++ b/import.Rmd @@ -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.