simple.marginals {Simple} | R Documentation |
create marginal totals for a table
simple.marginals(x)
x |
x is the output of a table command, or a matrix of data |
returns a matrix which include x and its marginal totals
John Verzani
margin.total
smokes <- c("Y","N","N","Y","N","Y","Y","Y","N","Y") amount <- c(1,2,2,3,3,1,2,1,3,2) x<- table(smokes,amount) simple.marginals(x)