[R] Table orderd by frequencies

Kunzler, Andreas a.kunzler at bzaek.de
Tue Jul 22 09:59:54 CEST 2008

Dear List,

I try to order the output of a table by the frequencies of the vector I
am look at.

The object I am looking at is a factor with a lot of levels that were
named only once.

Therefore it would be much easier to order the output by the frequencies
of the levels.

> levels(a)
"a" "b" "c" "d"

Preferred outcome: 

b  c a d
10 5 1 1

Thank you

More information about the R-help mailing list