binary_row: Binary Row

Description Usage Arguments Examples

View source: R/binary_row.R

Description

Adds in a binary row to the table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
binary_row(
  list_obj,
  row_var,
  col_var = NULL,
  newdata = FALSE,
  rowlabels = NULL,
  summary = binary_default,
  reference = NULL,
  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)

reference

the name of the row category to use as the reference. Default will use alphabetical first category.

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$color <- sample(c("Blue", "Purple"), size=150, replace=TRUE)
x <- tbl_start(iris, "Species", missing=TRUE, overall=TRUE, comparison=TRUE) %>%
  binary_row("color", rowlabels="Color")

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