SyntaxFix
Write A Post
Hire A Developer
Questions
It is a one-line approach by using aggregate.
aggregate
> aggregate(data.frame(count = v), list(value = v), length) value count 1 1 25 2 2 75