[R] format of 2x2 table

From: array chip <arrayprofile_at_yahoo.com>
Date: Thu 02 Feb 2006 - 07:16:10 EST


Does anyone know how I can generate a 2x2 table in a format where in each cell of the table, it contains a) count (frequency) b) total percentage c) row percentage d) column percentage. SAS can generate this format easily, is there a R package that can do this?

Frequency |
Percent   |
Row Pct   |
Col Pct   | positive  negative  |  Total
--------------------------------|-------
disease   |        6        22  |     28

| 20.69 75.86 | 96.55
| 21.43 78.57 |
| 100.00 95.65 | ----------|---------------------|------- normal | 0 1 | 1
| 0.00 3.45 | 3.45
| 0.00 100.00 |
| 0.00 4.35 |
----------|---------------------|------- Total | 6 23 | 29
| 20.69 79.31 | 100.00

Thanks



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Feb 02 07:29:51 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:16 EST