[R] Calculating column percentages of a table

Rehceb Rotkiv scame at fastmail.fm
Sat Jun 2 22:42:27 CEST 2007


Hello,

I know, this is a real newbie question, but I can't find anything on this in
the manuals! I know that I get calculate the column totals of a table with
`apply(mytable, 2, sum)'. Now I want each column total to be 100% and
calculate the percentage of each field of the column. How would I do that?
Rcommander, the ultimate newb-tool, has a function `colPercents' which is
exactly what I need, but I do not want to load the whole thing into memory
just for this function. Is there a way to load just this single function
from the Rcmdr package?

Many thanks,
Rehceb Rotkiv
-- 
View this message in context: http://www.nabble.com/Calculating-column-percentages-of-a-table-tf3858317.html#a10931035
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list