I have this database:
structure(list(id = c(2, 2, 5, 5, 5, 7, 7, 8, 8), category = c("A",
"A", "A", "A", "B", "C", "B", "D", "D"), country = c("France",
"France", "Spain", "Canada", "Canada", "France", "Spain", "Argentina",
"Argentina"), Sport = c("Futbol", "Basket", "Basket", "Basket",
"Basket", "Futbol", "Basket", "Futbol", "Futbol")), row.names = c(NA,
-9L), class = c("tbl_df", "tbl", "data.frame"))
# A tibble: 9 x 4
id category country Sport
<dbl> <chr> <chr> <chr>
1 2 A France Futbol
2 2 A France Basket
3 5 A Spain Basket
4 5 A Canada Basket
5 5 B Canada Basket
6 7 C France Futbol
7 7 B Spain Basket
8 8 D Argentina Futbol
9 8 D Argentina Futbol
I need to group by id and find out in which columns the id's don't have the same values.
In this case, the output should indicate that id 2 does not have the same values in Sport, id 5 in category and country, and id 7 in all columns.
Thanks!