library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.2     ✔ tibble    3.3.0
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ✔ purrr     1.1.0     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readxl)

duh_data <- load("NSDUH 2022.Rdata")
summary(puf2022_110424$NOMARR2)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    1.00    1.00   99.00   56.78   99.00   99.00
health_data <- puf2022_110424|>select(HEALTH,IREDUHIGHST2)|>filter(HEALTH<90)
hist(health_data$HEALTH)

plot(health_data$HEALTH,health_data$IREDUHIGHST2)

cor(health_data$HEALTH,health_data$IREDUHIGHST2)
## [1] 0.006431003