I have a data frame A with name and type.
name aa tt gg cc aa at ag ac
type 3 2 4 3 2 2 3 3
How can I create a new ranked data.frame B with type and a count of the number of times
the type occurred in data.frame A?
count 4 3 1
type 3 2 4
Thank you for your help.
One option is the
table()function. For your data:it gives:
Now we just need to sort it:
These steps can be combined, of course: