Skip to contents

Argument Conventions

The following dummy functions are unexported and used to document argument conventions in the framework.

lyt_args()
Layouting Function Arg Conventions
constr_args()
Constructor Arg Conventions
compat_args()
Compatibility Arg Conventions
gen_args()
General Argument Conventions
sf_args()
Split Function Arg Conventions

Layout and Tabulation

Functions for declaring layout and tabulation

qtable()
Generalized Frequency Table
build_table()
Create a table from a layout and data
basic_table()
Layout with 1 column and zero rows
analyze()
Generate Rows Analyzing Variables Across Columns
append_topleft()
Append a description to the 'top-left' materials for the layout
split_cols_by()
Declaring a column-split based on levels of a variable
add_colcounts()
Add the column population counts to the header
split_rows_by()
Add Rows according to levels of a variable
summarize_row_groups()
Add a content row of summary counts
split_cols_by_multivar()
Associate Multiple Variables with Columns
split_rows_by_multivar()
Associate Multiple Variables with Rows
analyze_colvars()
Generate Rows Analyzing Different Variables Across Columns
split_cols_by_cuts() split_rows_by_cuts() split_cols_by_cutfun() split_cols_by_quartiles() split_rows_by_quartiles() split_rows_by_cutfun()
Split on static or dynamic cuts of the data
add_overall_col()
Add Overall Column
add_existing_table()
Add an already calculated table to the layout
table_inset() `table_inset<-`()
Access or (recursively) set table inset. (from formatters)

Tabulation Utility Functions

Functions that are useful to be used with the analyze* functions.

in_rows()
Create multiple rows in analysis or summary functions
simple_analysis()
Default tabulation
make_afun()
Create custom analysis function wrapping existing function
list_wrap_x() list_wrap_df()
Returns a function that coerces the return values of f to a list
spl_context
.spl_context within analysis and split functions
spl_context_to_disp_path()
Translate spl_context to Path for display in error messages
counts_wpcts()
Analysis function to count levels of a factor with percentage of the column total

Split Functions

add_overall_level()
Add an virtual 'overall' level to split
remove_split_levels() keep_split_levels() drop_split_levels() drop_and_remove_levels() reorder_split_levels() trim_levels_in_group()
Split functions
select_all_levels add_combo_levels()
Add Combination Levels to split
trim_levels_to_map()
Trim Levels to map
custom_split_funs
Custom Split Functions
do_base_split()
Apply Basic Split (For Use In Custom Split Functions)

Custom Split Functions

make_split_fun()
Create a Custom Splitting Function
drop_facet_levels()
Preprocessing Functions for use in make_split_fun
trim_levels_in_facets()
Trim Levels of Another Variable From Each Facet (Postprocessing split step)
add_combo_facet() add_overall_facet()
Add a combination facet in postprocessing
make_split_result() add_to_split_result()
Construct split result object
spl_variable()
Variable Associated With a Split

cell formatting.

format_rcell()
Format rcell
value_formats()
Value Formats
rtables_aligns()
Alignment utils

Table Structure Information

nrow(<VTableTree>) ncol(<VTableNodeInfo>) dim(<VTableNodeInfo>)
Table Dimensions
row_paths() col_paths()
Return List with Table Row/Col Paths
row_paths_summary() col_paths_summary()
Print Row/Col Paths Summary
table_structure()
Summarize Table
summarize_rows()
summarize_rows
table_shell() table_shell_str()
Table shells
make_row_df()
Make row and column layout summary data.frames for use during pagination (from formatters)
make_col_df()
Column Layout Summary

Layout Structure Information

vars_in_layout()
List Variables required by a pre-data table layout

Access and Modify

cell_values() value_at()
Retrieve cell values by row and column path
top_left() `top_left<-`()
Top Left Material (Experimental)
rbindl_rtables() rbind(<VTableNodeInfo>) rbind2(<VTableNodeInfo>,<ANY>)
rbind TableTree and related objects
cbind_rtables()
cbind two rtables
as.vector(<VTableTree>)
convert to a vector
`[<-`(<VTableTree>,<ANY>,<ANY>,<list>) `[`(<VTableTree>,<logical>,<logical>)
Retrieve and assign elements of a TableTree
clear_indent_mods()
Clear All Indent Mods from a Table
head() tail()
Head and tail methods

Validating and Fixing Table Structure

validate_table_struct() assert_valid_table()
Validate and Assert valid table structure (Experimental).
sanitize_table_struct()
Sanitize degenerate table structures (Experimental)
find_degen_struct()
Find degenerate (sub)structures within a table (Experimental)

Sorting and Pruning

prune_table()
Recursively prune a TableTree
all_zero_or_na() all_zero() content_all_zeros_nas() prune_empty_level() prune_zeros_only() low_obs_pruner()
Trimming and Pruning Criteria
trim_zero_rows()
Trim Zero Rows
trim_rows()
Trim rows from a populated table without regard for table structure
sort_at_path()
Sorting a Table at a Specific Path
cont_n_allcols() cont_n_onecol()
Score functions for sorting TableTrees

Compatibility Layer

These functions provide some backwards compatibility to the previous (pre 2021) rtables framework.

rtable() rtablel()
Create a Table
rrow()
row
rcell() non_ref_rcell()
Cell value constructors
rheader()
Create a header
rrowl()
rrowl
indent()
Change indentation of all rrows in an rtable
df_to_tt()
Create ElementaryTable from data.frame

Output Functions

These functions create ascii or html representations of the table

as_html()
Convert an rtable object to a shiny.tag html object
export_as_pdf()
Export as PDF
export_as_tsv() import_from_tsv()
Create Enriched flat value table with paths
tt_to_flextable()
Create a FlexTable object representing an rtables TableTree
toString(<VTableTree>)
Convert an rtable object to a string
get_formatted_cells() get_cell_aligns()
get formatted cells
path_enriched_df()
Transform TableTree object to Path-Enriched data.frame

Utility Functions

utility functions

Viewer()
Display an rtable object in the Viewer pane in RStudio or in a browser
compare_rtables()
Compare two rtables
indent_string()
Indent Strings
is_rtable()
Check if an object is a valid rtable

Pagination

Pagination related functionality

pag_tt_indices() paginate_table()
Pagination of a TableTree
make_row_df()
Make row and column layout summary data.frames for use during pagination (from formatters)
make_col_df()
Column Layout Summary

TableTree Framework Accessor Functions

content_table() `content_table<-`()
Retrieve or set Content Table from a TableTree
tree_children() `tree_children<-`()
Retrieve or set the direct children of a Tree-style object
collect_leaves()
Collect leaves of a table tree
obj_avar() row_cells() `row_cells<-`() row_values() `row_values<-`()
Row attribute accessors
no_colinfo()
Exported for use in tern
clayout() `clayout<-`() col_info() `col_info<-`() coltree() col_exprs() col_counts() `col_counts<-`() col_total() `col_total<-`()
Column information/structure accessors
horizontal_sep() `horizontal_sep<-`()
Access or recursively set header-body separator for tables
table_inset() `table_inset<-`()
Access or (recursively) set table inset. (from formatters)
main_title() `main_title<-`() subtitles() `subtitles<-`() page_titles() `page_titles<-`() main_footer() `main_footer<-`() prov_footer() `prov_footer<-`() all_footers() all_titles()
General title/footer accessors (from formatters)
top_left() `top_left<-`()
Top Left Material (Experimental)
obj_name() `obj_name<-`() obj_label() `obj_label<-`() obj_format() `obj_format<-`() obj_na_str() `obj_na_str<-`() obj_align() `obj_align<-`()
Label, Name and Format accessor generics (from formatters)

TableTree Framework Constructors and S4 Classes

S4 classes and constructors

manual_cols()
Manual column declaration
CellValue()
Cell Value constructor
EmptyColInfo EmptyElTable EmptyRootSplit EmptyAllSplit
Empty table, column, split objects
ManualSplit()
Manually defined split
MultiVarSplit()
Split between two or more different variables
VarLevelSplit() VarLevWBaselineSplit()
Split on levels within a variable
AnalyzeVarSplit() AnalyzeColVarSplit() AnalyzeMultiVars()
Define a subset tabulation/analysis
make_static_cut_split() VarDynCutSplit()
Splits for cutting by values of a numeric variable
InstantiatedColumnInfo()
InstantiatedColumnInfo
LabelRow() .tablerow() DataRow() ContentRow()
Row classes and constructors
ElementaryTable() TableTree()
TableTree classes

Pathing and insertion related functions

label_at_path() `label_at_path<-`()
Label at Path
tt_at_path() `tt_at_path<-`()
Get or set table elements at specified path
insert_row_at_path()
Insert Row at Path

Referential Footnotes

Functions related to referential footnotes

Result Dataframe Functions

Functions for generating result data frames from rtables TableTree objects

as_result_df()
Generate a Result Data Frame
result_df_specs()
Result Data Frame Specifications