Skip to content
Prev 26439 / 398502 Next

R function similar to UNIX "uniq -c"?

On Thu, 19 Dec 2002, Hilmar M. Carders wrote:
There must be a better way to do this, but this would get you the
information you're looking for:
[1] "a" "b" "c" "d"
[[1]]
[1] 3

[[2]]
[1] 1

[[3]]
[1] 2

[[4]]
[1] 1

-J