[R] Controlling the Output from table()

Öhagen Patrik Patrik.Ohagen at mpa.se
Sun Oct 7 08:56:17 CEST 2007

Dear All,

I would like to have some controll over the output from the function table(). I want to controll the order of the cells and I want to include empty cells (if any).

Example: I have ordinal data wich takes the values 1,2,3....N but I want the output from table to put the frequencies in a different order, say, 3,7,1,4.... and I want to include categories with zero frequency.

How is that done?

Cheers, Patrik

More information about the R-help mailing list