I have this table in R: library(plyr) col_1_legend = structure(list(original_data.col_1 = structure(1:3, .Label = c("a", "b", "c"), class = "factor"), sample_data.col_1 = 1:3), row.names = c(1L, 3L, 4L), class = "data.frame") col_3_legend = structure(list(original_data.col_3 = structure(c(2L, 1L, 4L, 3L), .Label = c("a", "bb", "f", "g"), class = "factor"), sample_data.col_3 = 4:7), row.names = c(NA, 4L), class = "data.frame") col_4_legend = structure(list(original_data.col_4 = structure(c(3L, 1L, 2L, 4L, 5L), .Label = c("j", "jj", "k", "p", "pp"), class = "factor"), sample_data.col_4 = 8:12), row.names = c(1L, 2L, 4L, 5L, 6L), class = "data.frame") Since each column had a different number of rows, I had to figure out a way to make a data frame with a differing number of rows: my_table...