Given a list of characters, for example:
L <- list("a", "b", "c", "d")
Note that the length L not fixed.
How can I get adjacent pairs of combinations, for example:
[,1] [,2] [1,] "a" "b" [2,] "b" "c" [3,] "c" "d"
Actually, I am doing this work to get a directional matrix for further network analysis. U know that in a specific computer mediated communication, people discuss each other in turn, there is a sequence, the new recipient answers only the last message.
source share