So, I have a sample data
structure(list(Conversation = c(1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L,
2L, 2L, 3L, 3L), ID.Number = c("ID 11", "ID 11", "ID 11", "ID 11",
"ID 11", "ID 11", "ID 14", "ID 14", "ID 14", "ID 14", "ID 14",
"ID 14"), Swear.word = c(0L, 2L, 4L, 3L, 0L, 0L, 1L, 0L, 3L,
1L, 0L, 4L)), class = "data.frame", row.names = c(NA, -12L))
And, I am trying to have a result that looks like
structure(list(IDNumber = c(11L, 14L), Convo1 = 2:1, Convo2 = c(7L, 4L), Convo3 = c(0L, 4L)), class = "data.frame", row.names = c(NA, -2L))
So, basically, I am trying to see swear words usage (sum of the word usage) by conversation type (convo#) for each participant.
How can I do this using R?
Thanks!