hd_data <- hd_data |>
mutate(
ExAng = factor(ExAng,
levels = c(0, 1),
labels = c("no", "yes")
),
HD = factor(HD,
levels = c("No", "Yes"),
labels = c("no", "yes")
),
ChestPain = factor(ChestPain),
Thal = factor(Thal),
fasting_blood_glucose = factor(Fbs,
levels = c(0, 1),
labels = c("normal", "high")
)
)
hd_data |>
ggplot(ggplot2::aes(Age, MaxHR, color = HD)) +
geom_point() +
geom_smooth(method = "lm")`geom_smooth()` using formula = 'y ~ x'
