#Unquoted selection
heart_disease %>%
stratiply(
head,
Sex
)
#Select helper
heart_disease %>%
stratiply(
f = head,
by = starts_with("S")
)
#Use additional arguments for the function
heart_disease %>%
stratiply(
f = glm,
by = Sex,
formula = HeartDisease ~ .,
family = "binomial"
)
#Use mixed selections to split by desired columns
heart_disease %>%
stratiply(
f = glm,
by = c(Sex, where(is.logical)),
formula = HeartDisease ~ Age,
family = "binomial"
)
Run the code above in your browser using DataLab