How to find the table of the same series and save their number in a separate column?

Hi, I have the following table:

gene 5 5 5
gene 4 4 3
gene 5 5 5
gene 1 4 5


I would like to get this:
gene 5 5 5 2
gene 4 4 3 1
gene 1 4 5 1


accordingly, a separate column displays the number of encountered series with the same data, in this case, in the table two rows of gene 5 5 5 and the rest one by one.

Can it be done using R, for example?

Thank you!
April 3rd 20 at 17:24
2 answers
April 3rd 20 at 17:26
Solution
Table in plain text? You will help the utility uniq.
April 3rd 20 at 17:28
Solution
the sort table.csv | uniq -c

Find more questions by tags LinuxR