ez.table2: freq table

View source: R/stats.R

ez.table2R Documentation

freq table

Description

freq table, df followed by col names (df, col1, col2, col3), or vector, factor (eg, x,y,z), auto convert/reset factor
ez.table output is more beautiful, but must be two varibles/cols
result table can be further passed to prop.table(), addmargins(), addmargins(prop.table())

Usage

ez.table2(
  x,
  ...,
  dnn = NULL,
  exclude = c(NA, NaN),
  row.vars = NULL,
  col.vars = NULL
)

Arguments

x

... df followed by col names (df, col1, col2, col3), or vector, factor (eg, x,y,z)

dnn

c('col','row')

exclude

values to use in the exclude argument of factor when interpreting non-factor objects. could be NULL to include NA

row.vars

a vector of integers giving the numbers of the variables, or a character vector giving the names of the variables to be used for the rows of the flat contingency table.

col.vars

a vector of integers giving the numbers of the variables, or a character vector giving the names of the variables to be used for the columns of the flat contingency table.


jerryzhujian9/zmisc documentation built on Sept. 24, 2024, 2:40 p.m.