Skip to contents

Build

High-level functions to create and build a table

tplyr_spec()
Create a tplyr2 table specification
tplyr_build()
Build a tplyr2 table from a spec and data
is_tplyr_spec()
Check if an object is a tplyr_spec

Layers

Creating layers and adding them to a spec

tplyr_layers()
Create a list of layers
is_tplyr_layer()
Check if an object is a tplyr_layer
group_count()
Create a count layer
group_desc()
Create a descriptive statistics layer
group_shift()
Create a shift layer
group_analyze()
Create a custom analysis layer
label()
Create a text label for use in by parameters
layer_settings()
Create layer settings

Formatting

Controlling the display of numeric results

f_str()
Create a format string object
apply_formats()
Apply format strings to numeric values

Population Data and Groups

Population data, total groups, and custom groups

pop_data()
Create a population data configuration
is_pop_data()
Check if an object is a tplyr_pop_data
total_group()
Create a total group configuration
custom_group()
Create a custom column group configuration
tplyr_header_n()
Extract header N from a tplyr2 build result

Metadata

Cell-level traceability and source data extraction

tplyr_meta()
Metadata object for a tplyr output cell
tplyr_meta_result()
Get metadata for a specific output cell
tplyr_meta_subset()
Get source data rows for a specific output cell
generate_row_ids()
Generate unique row IDs for output rows

Numeric Data

Accessing raw unformatted results

tplyr_numeric_data()
Retrieve raw numeric data from a tplyr_build result
tplyr_stats_data()
Retrieve raw statistic values from a tplyr_build result

Post-Processing

Post-processing functions for display formatting

apply_conditional_format()
Conditional reformatting of a pre-populated string of numbers
apply_row_masks()
Apply row masks to blank repeated row labels
collapse_row_labels()
Collapse row labels into a single column
replace_leading_whitespace()
Replace leading whitespace with a specified string
str_extract_num()
Extract numeric values from formatted strings
str_indent_wrap()
Wrap strings to a specific width with hyphenation while preserving indentation

Serialization

Saving and loading spec files

tplyr_write_spec()
Write a tplyr_spec to JSON or YAML
tplyr_read_spec()
Read a tplyr_spec from JSON or YAML

Analysis Results Data

ARD format conversion

tplyr_to_ard()
Convert tplyr_build output to Analysis Results Data (ARD) format
tplyr_from_ard()
Reconstruct a formatted table from ARD and a spec

Datasets

Example clinical trial datasets

tplyr_adae
Adverse events analysis dataset
tplyr_adlb
Laboratory data analysis dataset
tplyr_adsl
Subject-level analysis dataset

Options and Helpers

Package options and helper functions

tplyr2_options()
Get or set tplyr2 package options
get_data_labels()
Extract variable labels from a data.frame