i have a problem with my R code. I have a dataframe that looks like this:
| Conversation ID | Message line | Author | Timestemp | Message text |
|---|---|---|---|---|
| 251231874149124 | 1 | 312457 | 2:19 | Hi! |
| 251231874149124 | 2 | 6912313 | 2:20 | Hi. |
| 251231874149124 | 3 | 312457 | 2:21 | how are you?! |
| 251231874149124 | 4 | 6912313 | 2:22 | fine |
| 143526273273415 | 1 | 2342423 | 12:19 | hi |
| 143526273273415 | 2 | 0815734 | 12:20 | hi. |
My output should look like this:
| Author | Message Text |
|---|---|
| 312457 | Hi!; how are you?! |
| 6912313 | Hi.; fine |
| 2342423 | hi |
| 0815734 | hi. |
The goal is, to add all text messages after another by seperating them with a semicolon.
My current code looks like this:
auth <- ddply(dfdata, "author", numcolwise(sum))
This code just sums up the lines of the author. Could you please help me to find a solution?
Thanks for any kind of help.