powered by
Nicely formatted tables, with row or column marginals etc.
ntable(x,y=NULL, percent=1,digits=2, row=FALSE,col=FALSE)
nothing returned; the function prints the table and exits silently.
vector or factor
factor
vector of factor
integer, 1 for row percentages (default), 2 for column percentages
integer, digits to print after decimal place (default is 2)
logical, if TRUE, print row marginals
TRUE
logical, if TRUE, print column marginals
Jim Fearon jfearon@stanford.edu
A wrapper function to prop.table that produces prettier looking results.
prop.table
prop.table, table
table
data(bioChemists) attach(bioChemists) ntable(fem) ntable(fem,mar,row=TRUE) ntable(fem,mar,per=2,col=TRUE) ntable(fem,mar,per=2,row=TRUE,col=TRUE)
Run the code above in your browser using DataLab