---
title: "R Notebook"
output: html_notebook
---
```{r}
library(pacman)
p_load(NHANES, Amelia, naniar, DataExplorer, tidyverse)
```
```{r}
help(NHANES)
data("NHANES")
NHANES
```
## Visualize the missing values in the NHANES dataframe
```{r}
Amelia::missmap(NHANES)
```
```{r}
naniar::vis_miss(NHANES)
```
```{r}
naniar::gg_miss_var(NHANES)
```
```{r}
NHANES_Sleep <- NHANES %>% select(starts_with("Sleep"))
head(NHANES_Sleep)
naniar::gg_miss_var(NHANES_Sleep)
```
```{r}
create_report(NHANES, y = "SleepHrsNight")
```
```{r}
create_report(NHANES, y = "SleepTrouble")
```