I have a large dataset I want to simplify but I'm currently having some troubles with one thing. The following table shows a origin destination combination. The count column, represents the amount of occurrences of A to B for example.
From    To  count
A       B     2
A       C     1
C       A     3
B       C     1
The problem I have is that for example A to C (1), is actually the same as C to A (3). As direction doesn't really matter to me only that there's a connection between A and C, I wonder how can I simply have A to C (4).
The problem is that I have a factor with 400 levels, so I can't do it manually. Is there something with dplyr or similar that can solve this for me?
 
     
    