Why is distinct() not removing all duplicates using dplyr piping?

It is extremely difficult to read your code . may i suggest reading this?