[R] cross tabulation: convert frequencies to percentages

soeren.vogel at eawag.ch soeren.vogel at eawag.ch
Fri Feb 27 15:43:48 CET 2009


might be rather easy for R pros, but I've been searching to the dead  
end to ...

twsource.area <- table(twsource, area, useNA="ifany")

gives me a nice cross tabulation of frequencies of two factors, but  
now I want to convert to pecentages of those absolute values. In  
addition I'd like an extra column and an extra row with absolute sums.  
I know, Excel or the likes will produce it more easily, but how would  
the procedure look like in R?



More information about the R-help mailing list