The colPercents command is part of the RcmdrMisc package that I installed as part of STAT 3743. From the R community, it looks like you can get the same value using prop.table and cbind, though that's a multi-step process.
Just two parameters, the table of frequency counts, and optional digits for % display.
R Example
> colPercents(xtabs(~ lfp + wc, data=Mroz))
wc
lfp no yes
no 47.5 32.1
yes 52.5 67.9
Total 100.0 100.0
Count 541.0 212.0
This table reports that 47.5% of married women who did not attend college do not work.
No comments:
Post a Comment
Please help to combat malicious use of the Internet.