Hi everyone!

I have a table of that sort:

ID1 ID2 relatedness

A B 0.5

A C 0.8

B C 0.7

I would like to make a summary for each ID (A, B, C) of the relatedness values.

I was of course thinking about using summarise function, to get min, max, average etc. for each accession.

The issue is that if I *group_by* ID1, then for A, I would indeed have the two values of relatedness used for summarizing.

But for B, only the last value of the relatedness from the above table would be used, because it's other value (with A) is on the first line.

What is the way to tell to group by both ID1 and ID2 so that for calculating the summary of relatedness for each accessions, it would check in both ID1 and ID2 columns?

Thanks!

Muriel