I have this format of dataframe:
df <- structure(list(col1 = structure(1:2, .Label = c("text1", "text3"
), class = "factor"), col2 = structure(c(2L, 1L), .Label = c("text1",
"text2"), class = "factor"), col3 = structure(c(1L, 1L), .Label = "text1", class = "factor"),
col4 = structure(1:2, .Label = c("text2", "text4"), class = "factor")), .Names = c("col1",
"col2", "col3", "col4"), class = "data.frame", row.names = c(NA,
-2L))
And I would like to merge/combine all columns into one without keeping the column names.
Example output:
text1
text2
text1
text2
text3
text1
text1
text4
I found this example but it merges the rows.