Given a dataframe
A <- c("One", "Two", "Three")
B <- c(1,2,3)
C <- c(1,1,1)
df <- data.frame(A,B,C)
I would like to generate a list of dataframe such that it looks like the example below
A
One
Two
Three
A B
One 1
Two 2
Three 3
A B C
One 1 1
Two 2 1
Three 3 1
I'am dealing with a dataframe with ~50 columns. I tried several attemps but with little success.
Thanks!