---
title: "M02 Lab · Set Up Your Course Project"
author: "Your Name"
date: today
format:
  html:
    toc: true
    toc-depth: 3
    theme: cosmo
    df-print: paged
    highlight-style: github
    embed-resources: true
execute:
  warning: false
  message: false
---

# Setup

Let's load the packages we'll use in this notebook.

```{r}
#| warning: false
#| message: false

library(tidyverse)
library(here)
library(skimr)
library(gtsummary)
```

# Import Data

The `here` package lets us write paths relative to the project root (where `PSY652_project.Rproj` lives). As long as you opened the project first, this path should work on any computer.

```{r}
nhanes <- read_rds(here("data", "nhanes.Rds"))
```

# Glimpse

This gives you a quick structural look at the dataset — row count, column types, and the first few values in each column.

```{r}
nhanes |> glimpse()
```

# Descriptive Statistics

<!-- TODO (M02 Lab, Step 6 of the lab page)

You'll add THREE things in this section, in this order:

1. A CODE CHUNK using the skimr approach, summarizing three categorical
   NHANES variables: sex, marital_status, and education.

2. A CODE CHUNK using the gtsummary approach, summarizing those same three
   variables.

   The lab page gives you both chunks in full -- type them in here. Don't
   paste them as plain prose; put them in real code chunks.

3. YOUR INTERPRETATION, written as prose directly BELOW both chunks.
   Write two or three sentences that answer:
     - Which of the three variables have missing values?
     - Why are so many values missing for marital_status and education?
       (Think back to M01 -- this is missing BY DESIGN, not a data error.)
     - What does tbl_summary() show you that is harder to see in the
       skim() output?

Then re-render. When you're done, this section should contain the skim
output, the gtsummary table, AND your two-to-three sentences -- all three.

Delete this comment block once you've added everything.
-->
