[R] Table orderd by frequencies

From: Kunzler, Andreas <a.kunzler_at_bzaek.de>
Date: Tue, 22 Jul 2008 09:59:54 +0200

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

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 22 Jul 2008 - 08:04:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jul 2008 - 09:32:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive