tablenway: Tabulate a set of variables by an N-dimensional grouping...

Description Usage Arguments Value

View source: R/tidy.table.one.R

Description

Tabulate a set of variables by an N-dimensional grouping variable.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
tablenway(
  df,
  grpvar,
  testTypes = NULL,
  d = 1,
  p.digits = 3,
  fisher.simulate.p = FALSE,
  trunc_binary = TRUE,
  combined = FALSE,
  lbl = "",
  caption = ""
)

Arguments

df

A data frame or tibble with Hmisc-brand labels.

grpvar

The quoted name of a grouping variable that splits df into N cohorts.

testTypes

A vector of length nrow(df) containing "mean" for means and SDs or "median" medians and IQRs; applies only to continuous variables. Leave NULL to allow the function to choose for you based on the distance between the mean and median.

d

Number of significant digits to report in numbers in the tbl1 object.

p.digits

Not used.

fisher.simulate.p

Not used.

trunc_binary

If TRUE print only one row for categorical variables with 2 levels. If FALSE, binary variables are printed on two rows, with the variable name on a row above. Default is TRUE.

lbl

LaTeX label to be passed to tx() for labeling the table in a LaTeX document.

caption

Text to be passed to tx() or md() to caption the table.

Value

A tbl1 object that can be formatted by tx() or md().


trahelyk/trahelyk_pkg documentation built on June 14, 2021, 9:25 p.m.