R: [R] Display table as percentage

Ko-Kang Kevin Wang kwan022 at stat.auckland.ac.nz
Mon Aug 12 10:09:15 CEST 2002


Thanks a lot!

prop.table is exactly what I want.

On Mon, 12 Aug 2002, Guazzetti Stefano wrote:

> Date: Mon, 12 Aug 2002 08:51:14 +0200
> From: Guazzetti Stefano <Stefano.Guazzetti at ausl.re.it>
> To: Ko-Kang Kevin Wang <kwan022 at stat.auckland.ac.nz>
> Subject: R: [R] Display table as percentage
> 
> Could  prop.table be the function that you are looking for?
> Stefano
> > -----Messaggio originale-----
> > Da: Ko-Kang Kevin Wang [mailto:kwan022 at stat.auckland.ac.nz]
> > Inviato: lunedì 12 agosto 2002 6.29
> > A: R Help
> > Oggetto: [R] Display table as percentage
> > 
> > 
> > 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
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> > _._._._._._._._._
> > 
> 

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