Build

High-level functions to create and build a table

build()

Trigger the execution of the tplyr_table

tplyr_table()

Create a Tplyr table object

pop_data() `pop_data<-`() set_pop_data()

Return or set population data bindings

pop_treat_var() set_pop_treat_var()

Return or set pop_treat_var binding

Layers and layering

Creating layers and adding them to the table

add_layer() add_layers()

Attach a layer to a tplyr_table object

tplyr_layer()

Create a tplyr_layer object

group_count() group_desc() group_shift()

Create a count, desc, or shift layer for discrete count based summaries, descriptive statistics summaries, or shift count summaries

Formatting

Customizing the display as a table

f_str()

Create a f_str object

get_desc_layer_formats() set_desc_layer_formats() get_count_layer_formats() set_count_layer_formats() get_shift_layer_formats() set_shift_layer_formats()

Get or set the default format strings for descriptive statistics layers

set_format_strings()

Set the format strings and associated summaries to be performed in a layer

set_missing_count()

Set the display for missing strings

Sorting

Sorting and customizing table order

set_order_count_method() set_ordering_cols() set_result_order_var()

Set the ordering logic for the count layer

set_outer_sort_position()

Set the value of a outer nested count layer to Inf or -Inf

Adding Groups and Stats

add_total_row()

Add a Total row into a count summary.

add_treat_grps() add_total_group() treat_grps()

Combine existing treatment groups for summary

add_risk_diff()

Add risk difference to a count layer

set_total_row_label()

Set the label for the total row

Summary Functions

set_custom_summaries()

Set custom summaries to be performed within a descriptive statistics layer

get_precision_by() set_precision_by()

Set or return precision_by layer binding

get_precision_on() set_precision_on()

Set or return precision_on layer binding

Counting functions

set_denoms_by()

Set variables used in pct denominator calculation

set_distinct_by()

Set counts to be distinct by some grouping variable.

set_denom_where()

Set Logic for denominator subsetting

set_nest_count()

Set the option to nest count layers

set_outer_sort_position()

Set the value of a outer nested count layer to Inf or -Inf

set_missing_count()

Set the display for missing strings

keep_levels()

Select levels to keep in a count layer

set_denom_ignore()

Set values the denominator calculation will ignore

set_indentation()

Set the option to prefix the row_labels in the inner count_layer

Column Headers

add_column_headers()

Attach column headers to a Tplyr output

header_n() `header_n<-`() set_header_n()

Return or set header_n binding

Helper functions

apply_row_masks()

Replace repeating row label variables with blanks in preparation for display.

get_numeric_data()

Retrieve the numeric data from a tplyr objects

get_stats_data()

Get statistics data

get_by() set_by()

Set or return by layer binding

get_target_var() set_target_var()

Set or return treat_var binding

treat_var() set_treat_var()

Return or set the treatment variable binding

get_where() set_where() set_pop_where() get_pop_where()

Set or return where binding for layer or table

Tplyr

A grammar of summary data for clinical reports