I'm looking for a way to make a summary table that compares values each level of a factor in R to all other levels for that factor. An example with the iris dataset - I would want to compare setosa to all others (i.e., versicolor and virginica), then versicolor to others (setosa and virginica), and finally virignica to others (versicolor and setosa). In my actual dataset I have many groups, so I don't want to hard code each level. I'm looking for a tidyverse solution if possible. My desired outcome would be a summarise table that looks like this:

[![enter image description here](https://i.stack.imgur.com/jfeKz.png)](https://i.stack.imgur.com/jfeKz.png)

Here - the 'yes' in 'in group' is the Species that are in that group (so for setosa, it would be setosa only) and the 'no' is the Species that are not in that group (so for Setosa - no it would be versicolor and virgnicia combined).