diff --git a/90-AppendixA-DataImport.Rmd b/90-AppendixA-DataImport.Rmd index 9c5f9d5..dfb83d8 100644 --- a/90-AppendixA-DataImport.Rmd +++ b/90-AppendixA-DataImport.Rmd @@ -141,11 +141,11 @@ anes_excel <- ## Importing Stata, SAS, and SPSS files into R -The {haven} package, also from the tidyverse ecosystem, imports various proprietary data formats: Stata `.dta` files, SPSS `.sav` files, and SAS `.sas7bdat` and `.sas7bcat` files [@R-haven]. One of the notable strengths of the {haven} package is its ability to handle multiple proprietary formats within a unified framework. It offers dedicated functions for each supported proprietary format, making it straightforward to import data regardless of the program. Here, we introduce `read_dat()` for Stata files, `read_sav()` for SPSS files, and `read_sas()` for SAS files. +The {haven} package, also from the tidyverse ecosystem, imports various proprietary data formats: Stata `.dta` files, SPSS `.sav` files, and SAS `.sas7bdat` and `.sas7bcat` files [@R-haven]. One of the notable strengths of the {haven} package is its ability to handle multiple proprietary formats within a unified framework. It offers dedicated functions for each supported proprietary format, making it straightforward to import data regardless of the program. Here, we introduce `read_dta()` for Stata files, `read_sav()` for SPSS files, and `read_sas()` for SAS files. ### Syntax -Let's explore the syntax for importing Stata files `.dat` files using `haven::read_dat()`: +Let's explore the syntax for importing Stata files `.dta` files using `haven::read_dta()`: ```r read_dta( @@ -166,7 +166,7 @@ The arguments are: * `skip` and `n_max`: control the number of rows skipped and the maximum number of rows imported * `.name_repair`: determines how column names are repaired if they are not valid -The syntax for `read_sav()` is similar to `read_dat()`: +The syntax for `read_sav()` is similar to `read_dta()`: ``` read_sav( diff --git a/94-AppendixE-Corrections-Remarks.Rmd b/94-AppendixE-Corrections-Remarks.Rmd new file mode 100644 index 0000000..2c5863d --- /dev/null +++ b/94-AppendixE-Corrections-Remarks.Rmd @@ -0,0 +1,7 @@ +# Corrections & Remarks {#corrections-remarks} + +These errata are in the print version. They have been corrected in the online version. + +## Appendix A.3 {-} + +Stata files have the extension of `.dta`. There are a few instances of using the function `read_dat()` instead of `read_dta()` on Page 315. \ No newline at end of file diff --git a/_bookdown.yml b/_bookdown.yml index 68f7548..a8dfec9 100644 --- a/_bookdown.yml +++ b/_bookdown.yml @@ -2,7 +2,7 @@ book_filename: bookdown clean: [packages.bib, bookdown.bbl] delete_merged_file: true rmd_files: - html: ['index.Rmd', '01-introduction.Rmd', '02-overview-surveys.Rmd', '03-survey-data-documentation.Rmd', '04-set-up.Rmd', '05-descriptive-analysis.Rmd', '06-statistical-testing.Rmd', '07-modeling.Rmd', '08-communicating-results.Rmd', '09-reproducible-data.Rmd', '10-sample-designs-replicate-weights.Rmd', '11-missing-data.Rmd', '12-successful-survey-data-analysis.Rmd', '13-ncvs-vignette.Rmd', '14-ambarom-vignette.Rmd', '90-AppendixA-DataImport.Rmd', '91-AppendixB-ANES-CB.Rmd', '92-AppendixC-RECS-CB.Rmd', '93-AppendixD-Solutions.Rmd', '99-references.Rmd'] + html: ['index.Rmd', '01-introduction.Rmd', '02-overview-surveys.Rmd', '03-survey-data-documentation.Rmd', '04-set-up.Rmd', '05-descriptive-analysis.Rmd', '06-statistical-testing.Rmd', '07-modeling.Rmd', '08-communicating-results.Rmd', '09-reproducible-data.Rmd', '10-sample-designs-replicate-weights.Rmd', '11-missing-data.Rmd', '12-successful-survey-data-analysis.Rmd', '13-ncvs-vignette.Rmd', '14-ambarom-vignette.Rmd', '90-AppendixA-DataImport.Rmd', '91-AppendixB-ANES-CB.Rmd', '92-AppendixC-RECS-CB.Rmd', '93-AppendixD-Solutions.Rmd', '94-AppendixE-Corrections-Remarks.Rmd', '99-references.Rmd'] latex: ['index.Rmd', '01-introduction.Rmd', '02-overview-surveys.Rmd', '03-survey-data-documentation.Rmd', '04-set-up.Rmd', '05-descriptive-analysis.Rmd', '06-statistical-testing.Rmd', '07-modeling.Rmd', '08-communicating-results.Rmd', '09-reproducible-data.Rmd', '10-sample-designs-replicate-weights.Rmd', '11-missing-data.Rmd', '12-successful-survey-data-analysis.Rmd', '13-ncvs-vignette.Rmd', '14-ambarom-vignette.Rmd', '90-AppendixA-DataImport.Rmd', '91-AppendixB-ANES-CB-latex.Rmd', '92-AppendixC-RECS-CB-latex.Rmd', '93-AppendixD-Solutions-latex.Rmd', '99-references.Rmd'] language: label: