I would like to order the variables in the below tibble so I have a1, a2, ...d2. How can I achieve that?
library(tidyverse)
dat1 <- tibble(
b1 = c("Math", "Kisw", "Computer", "Biology"),
a1 = c("Science", "Geog", "Studies", "Math"),
a2 = c("Yes", "No", "Yes", "No"),
b2 = rnorm(4, 80, 5),
c2 = rnorm(4, 67, 5),
b4 = rnorm(4, 98, 5),
d2 = rnorm(4, 23, 5),
d1 = rnorm(4, 76, 5),
a5 = rnorm(4, 87, 5)
)