cat_row: Categorical Row

Description Usage Arguments Examples

View source: R/cat_row.R

Description

Adds in a categorical row to the table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cat_row(
  list_obj,
  row_var,
  col_var = NULL,
  newdata = FALSE,
  rowlabels = NULL,
  summary = cat_default,
  missing = NULL,
  overall = NULL,
  comparison = NULL,
  digits = 2
)

Arguments

list_obj

the name of the tbl_start object previously initialized.

row_var

the name of the variable to be used in the rows.

col_var

the variable to be used in the table columns. Default is from initialized tbl_start object

newdata

enter new dataset name if different from that initialized in tbl_start

rowlabels

the label for the table row name, if different from row_var

summary

summary function for the data. Default will compute proportion (N)

missing

missing logical: if TRUE, missing data is considered; FALSE only uses complete cases.

overall

logical: if TRUE, an overall column is included.

comparison

the name of the comparison test to do, if different from that initialized in tbl_start.

digits

significant digits to use.

Examples

1
2
3
iris$Stem.Size <- sample(c("Small", "Medium", "Medium", "Large"), size=150, replace=TRUE)
x <- tbl_start(iris, "Species", missing=TRUE, overall=TRUE, comparison=TRUE) %>%
  cat_row("Stem.Size", rowlabels="Stem Size")

thomasgstewart/tangram.pipe documentation built on June 8, 2021, 6:49 a.m.