got another problem with r dataframes.
#starting position
from <- c("A","B","A","C")
to <- c("D","F","D","F")
number <- c(3,4,6,7)
data.frame(from,to,number)
How can I count the numbers of the two same "from-to" relations (from A to D)? The result should look like my "result" dataframe.
#result
from <- c("A","B","C")
to <- c("D","F","F")
result <- c(9,4,7)
data.frame(from,to,result)
Thank you guys :)