Learn R Programming

cursory (version 1.0.0)

table_1: Create a Dataset Summary Table (I.E. Table 1)

Description

This helps creates demographics or summary table for a dataset, the eponymous "table 1". Given a data set a key for columns, describe the differences across the provided factor variables between the levels of key.

Usage

table_1(.data, key, .vars = vars(everything()), ...)

table_1_dispatcher(.data, var, name, key)

table_1_summarise(.data, var, name, key)

table_1_summarize(.data, var, name, key)

Arguments

.data

a dataset

key

the comparison variable, such as case/control.

.vars

a lazy list of variables to include in the description.

...

passed on to other methods.

var

Variable identifier, used to dispatch

name

name of the variable

Value

The result is a table which includes:

  • A 'Variable' column, can be renamed with the var.name argument

Details

table_1_summarise and table_1_dispatcher dispatch on the data type of the variable identified by var in .data

Examples

Run this code
# NOT RUN {
table_1(iris, Species)
table_1(CO2, Plant)

# }

Run the code above in your browser using DataLab