powered by
OrderedVarNames
OrderedVarNames(x, sep = ":")
input
output
# NOT RUN { z <- data.frame(A = factor(c("a", "b", "c")), B = factor(1:2), C = 1:6) x <- colnames(model.matrix(~B * C * A, z)) OrderedVarNames(x) # }
Run the code above in your browser using DataLab