Shortcut for table with addmargins and default useNA=T. As with base::table more than two factors possible

Table(X, ..., USENA = T)

Arguments

X

first variable to table

...

further variables to be tabled

USENA

=T, treat NA as category "NA", must be named to switch it off!!

Value

a frequency array (NOT a data.frame)

Details

Table

Examples

if (FALSE) { x<-rep(LETTERS[1:5],each=20) y<-rep(letters[1:5],20) y[1:2]<-NA z<-sample(1:5,100,replace=T) z[17]<-NA Table(x,y) # Table(x,y,F) # Does not work because of ... higher dimensional arrays are allowed Table(x,y,USENA=F) Table(x,y,z,USENA=T) # 3-dimensional array }