tplyr_table {Tplyr}R Documentation

Create a Tplyr table object

Description

The tplyr_table object is the main container upon which a Tplyr table is constructed. Tplyr tables are made up of one or more layers. Each layer contains an instruction for a summary to be performed. The tplyr_table object contains those layers, and the general data, metadata, and logic necessary.

Usage

tplyr_table(target, treat_var, where = TRUE, cols = vars())

Arguments

target

Dataset upon which summaries will be performed

treat_var

Variable containing treatment group assignments. Supply unquoted.

where

A general subset to be applied to all layers. Supply as programming logic (i.e. x < 5 & y == 10)

cols

A grouping variable to summarize data by column (in addition to treat_var). Provide multiple column variables by using vars

Details

When a tplyr_table is created, it will contain the following bindings:

tplyr_table allows you a basic interface to instantiate the object. Modifier functions are available to change individual parameters catered to your analysis. For example, to add a total group, you can use the add_total_group.

In future releases, we will provide vignettes to fully demonstrate these capabilities.

Value

A tplyr_table object

Examples


tab <- tplyr_table(iris, Species, where = Sepal.Length < 5.8)


[Package Tplyr version 1.2.1 Index]