# NOT RUN {
require(tidyverse)
#1) Exact match
heart_disease %>%
divide(
by = "Sex"
)
#2) Regular expression
heart_disease %>%
divide(
by = matches("^(S|H)")
)
#3) Beginning character
heart_disease %>%
divide(
by = starts_with("S")
)
# }
Run the code above in your browser using DataLab