I have a dataframe in R with three variables named for example
are both factors, while
df <- data.frame(
V1 = letters[1:4],
V2 = rep(LETTERS[1:3], each = 4),
V3 = 1:12
I am looking for a way to create a table that contains the values in
as the rows, and
as the columns.
I tried variations on table, but didn't get anywhere.
Perhaps someone could help,
Thanks in advance,