W
W
wolverine7772019-12-11 03:15:09
linux
wolverine777, 2019-12-11 03:15:09

How to find identical rows in a table and store 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 something like this:
gene  5   5  5   2
gene  4   4  3   1
gene  1   4  5   1

accordingly, a separate column displays the number of rows encountered with the same data, in this case there are two rows in the table gene 5 5 5and the rest one by one.
Can this be done with R, for example?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
paran0id, 2019-12-11
@wolverine777

Plain text table? The uniq utility will help you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question