Data Summaries

Objectives

R and RStudio have their roots in statistical programming, a type of programming focused on solving data analysis problems. In this module, we will learn how to import data files into R and how to summarize their contents. These are usually the first steps you’ll include when building a script for data analysis.

Key concepts

csv files, importing data, the $ operator, pipes (|> and %>%), count, summarize, factors, vectors, tibbles, dataframes

Readings

You should read this chapter before you come to class:

Slides

Slides have been adapted from the textbook readings using Claude AI.

In-class exercises

We will follow along with the examples given in the textbook. Create an R project called data-summaries, and save today’s work in a Quarto report called summary.qmd.

Weekly assignment

For your homework, you will also practice reading in a csv file and summarizing key variables using the screentime dataset. See the screentime page for more information about this dataset.

Download the screentime-summaries.qmd file to get started. You will submit your own version of this file, with code and markdown text filled in.