simple.marginals {Simple}R Documentation

create marginal rows and columns for a table

Description

create marginal totals for a table

Usage

simple.marginals(x)

Arguments

x x is the output of a table command, or a matrix of data

Value

returns a matrix which include x and its marginal totals

Author(s)

John Verzani

See Also

margin.total

Examples

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)

[Package Simple version 0.5 Index]