[R] Display table as percentage

Ko-Kang Kevin Wang kwan022 at stat.auckland.ac.nz
Mon Aug 12 06:29:00 CEST 2002


Hi,

Suppose I have something like:
> table(x, y)
   y
x  1   2  3  4
1 21  55 60 50
2 51 121 83 90
3  1   1  1  0
4  1   1 10 11
5  3   5 16  5
6 14  18 14  1
7  0   2  4  2
8  1   5  5  1
9 19  35 26 17


Is there an easy way to display the table as percentage, instead of the
actual frequencies?

Cheers,

Kevin

------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list