As the initial dataframe:
structure(list(text = c("test", "text", "section", "2", "sending"
), id = c(32, 32, 41, 41, 41)), class = "data.frame", row.names = c(NA,
-5L))
How is it possible to make from long to wide format using the same id to put in the same row the content of text column separated by space?
Example output:
id text
32 test text
41 section 2 sending