Data Import

Lecture 9

Dr. Elijah Meyer + Konnie Huang

Duke University
STA 199 - Fall 2022

September 26, 2022

Checklist

  • Open your ae-08 project in RStudio.

  • Lab-03 Due Tonight.

  • Exam 1 is coming (This week!)

Exam Study Tips

– Take notes that you can reference

– Go back through feedback

– Revisit AEs

– Review keys

– Ask questions

Survey

– Review

– Feedback

Regrades

– What they are

and are not…

Goals

– Understand how to export data files

– Understand multiple ways to read in data

– “New” functions: str_detect and fill

– Review

Prep Questions

Slido-Exam

Slido-Reading

Warm Up

Why should we bother with writing code to edit data rather than just editing the Excel file?

What is the difference between read.csv and read_csv?

read.csv vs read_csv

Application exercise

ae-08

– Go to the course GitHub org and find your ae-08 (repo name will be suffixed with your GitHub name).

– Clone the repo in your container, open the Quarto document in the repo, and follow along and complete the exercises.

– Render, commit, and push your edits by the AE deadline – 3 days from today.

Recap of AE

Recap of AE

– There are also special functions to work with dates and times! See preperation reading.