With
df <- data.frame(Factor1 = factor(c(rep ("A", 2), rep ("B", 2), rep("C", 2))),
Factor2 = factor(LETTERS[12:7]))
table(df$Factor1, df$Factor2)
how to convert the result:
G H I J K L
A 0 0 0 0 1 1
B 0 0 1 1 0 0
C 1 1 0 0 0 0
into a dataframe or matrix that looks exactly like the output above?
Thanks!