Package index
Pipeline Entry Points
Every arframe pipeline starts here. fr_table() creates a spec object from a data frame. fr_listing() and fr_figure() create specs for patient listings and embedded figures. fr_figure() accepts a single plot or a list of plots for multi-page figures, with optional per-page metadata tokens. All three return an fr_spec that flows through the same pipeline verbs.
-
fr_table() - Start a arframe Table Pipeline
-
fr_listing() - Start a arframe Listing Pipeline
-
fr_figure() - Start a arframe Figure Pipeline
Column Configuration
fr_cols() is the single source of truth for column structure: labels, widths, alignment, visibility, N-counts, and column splitting. fr_col() constructs individual column specs. Width modes: fixed inches, percentages, "auto" (content-measured), "fit" (scale to page width), and "equal" (divide remaining space). Alignment modes include "decimal" for stat-display alignment. N-counts accept named vectors, data frames, or lists and auto-route to spanning headers or column labels. fr_col(group=) creates inline spanning headers. Tidyselect formula syntax applies shared specs to multiple columns at once.
Titles and Footnotes
fr_titles() adds title lines above the table. Each argument is one line; plain text or the list form for per-line align, bold, and font_size overrides. fr_footnotes() adds footnote lines with .placement ("every" / "last"), .separator (rule above block), and per-line overrides via the list form. Both support inline {fr_*()} markup.
-
fr_titles() - Set Table Titles
-
fr_footnotes() - Set Table Footnotes
Header Presentation
fr_header() controls header presentation: bold, align (scalar or tidyselect named list for per-column targeting), valign ("bottom" default aligns short labels under multi-line ones), bg/fg colors, font_size, and repeat_on_page. N-counts are set via fr_cols(.n=). fr_spans() adds spanning headers at one or more levels (.level) with optional underline (.hline) and gap columns (.gap). For simple grouping, use fr_col(group=) inside fr_cols() instead.
-
fr_header() - Configure Column Header Presentation
-
fr_spans() - Add Spanning Column Headers
Page Layout
Paper size, orientation, margins, fonts, and pagination controls. fr_page() sets orphan_min/widow_min (default 3 rows), a continuation label for multi-page tables, col_gap (inter-column padding), and tokens (named list for custom {token} values). fr_pagehead() and fr_pagefoot() define three-zone running chrome with token substitution: built-in {thepage}, {total_pages}, {program}, {datetime}, plus any custom tokens. fr_spacing() controls blank lines at five table junctions.
-
fr_page() - Set Page Layout Options
-
fr_pagehead() - Set Running Page Header
-
fr_pagefoot() - Set Running Page Footer
-
fr_spacing() - Control Spacing Between Table Sections
Row Organization
fr_rows() handles group_by (keep-together groups), page_by (page breaks with a group label), indent_by (single-level string or multi-level named list for SOC/HLT/PT hierarchies), group_label (inject group values as header rows into a display column), blank_after, sort_by, repeat_cols, wrap, and group_keep. fr_rows_matches() creates data-driven row selectors (exact value or regex) for use in styling verbs.
-
fr_rows() - Configure Row Grouping and Pagination
-
fr_rows_matches() - Select Rows by Column Value or Pattern
Rules and Borders
Horizontal rules (fr_hlines()), vertical rules (fr_vlines()), and full grids (fr_grid()). Named presets ("header", "booktabs", "box", "void", etc.) or custom width, color, and linestyle for all rules in the set.
-
fr_hlines() - Apply Horizontal Rules
-
fr_vlines() - Apply Vertical Rules
-
fr_grid() - Apply Horizontal and Vertical Rules Together
Cell Styling
Cell, row, and column style overrides applied via fr_styles(). fr_style() targets cells by position, region, or tidyselect column selection; supports colspan/rowspan for merging. fr_row_style() and fr_col_style() apply uniformly across rows or columns. fr_style_if() applies styles data-driven: a formula or function evaluates cell values at render time. Narrower scope wins: cell > row > column; later styles override earlier ones. fr_style_explain() audits the resolved styles.
-
fr_style() - Define a Cell Style Override
-
fr_row_style() - Define a Row Style Override
-
fr_col_style() - Define a Column Style Override
-
fr_style_if() - Create a Conditional Style Override
-
fr_styles() - Apply Style Overrides to a Table
-
fr_style_explain() - Explain Style Resolution for a Cell
Inline Markup
Rich text in any string field – titles, footnotes, column labels, cell values. Includes fr_super()/fr_sub() (superscript/subscript), fr_bold()/fr_italic()/fr_underline() (font style), fr_dagger()/fr_ddagger() (regulatory symbols), em/en dashes, fr_newline() (line break within a cell), and fr_unicode() for arbitrary Unicode characters. Sentinel tokens are resolved per-backend at render time.
-
fr_super() - Superscript Markup
-
fr_sub() - Subscript Markup
-
fr_bold() - Bold Markup
-
fr_italic() - Italic Markup
-
fr_underline() - Underline Markup
-
fr_newline() - Line Break Within a Text Element
-
fr_dagger() - Dagger Symbol
-
fr_ddagger() - Double Dagger Symbol
-
fr_emdash() - Em Dash
-
fr_endash() - En Dash
-
fr_unicode() - Unicode Character by Codepoint
Theme and Configuration
Four-tier defaults: package defaults < _arframe.yml (auto-discovered) < fr_theme() (session-wide) < per-table verbs. fr_config() loads a YAML file covering page layout, fonts, column behavior, header style, rules, spacing, tokens, and footnote defaults. fr_theme() sets the same options programmatically. fr_theme_get() / fr_theme_reset() inspect and clear the session theme.
-
fr_theme() - Set or Update Study-Level Table Theme
-
fr_theme_get() - Get the Current Study-Level Table Theme
-
fr_theme_reset() - Reset the Study-Level Table Theme
-
fr_config() - Load Configuration from a YAML File
-
fr_config_get() - Get the Current Configuration
-
fr_config_reset() - Reset Configuration
Recipes
Reusable pipeline fragments. fr_recipe() captures a sequence of fr_*() verb calls as a language object (survives saveRDS()). Apply with fr_apply(spec, recipe). Compose multiple recipes with c(): later verbs override earlier replace-mode verbs and append to accumulate-mode verbs (fr_spans, fr_styles).
-
fr_recipe() - Create a Reusable Table Recipe
-
c(<fr_recipe>) - Combine Recipes
-
fr_apply() - Apply a Recipe to a Spec
Rendering
fr_render(spec, path) writes RTF, LaTeX source (.tex), or PDF (via XeLaTeX). Format is detected from the file extension. PDF requires XeLaTeX or tinytex; call fr_install_latex_deps() once to install required LaTeX packages. fr_backends() lists registered backends; fr_register_backend() / fr_unregister_backend() extend the system with custom output formats.
-
fr_render() - Render a Table to File
-
fr_backends() - List Registered Render Backends
-
fr_register_backend() - Register a Custom Render Backend
-
fr_unregister_backend() - Remove a Custom Render Backend
-
fr_latex_deps() - List Required LaTeX Packages
-
fr_install_latex_deps() - Install Required LaTeX Packages
Validation and Inspection
fr_validate() checks a spec before rendering: column names, span contiguity, width budget, style index range, font recognition, and listing-specific columns. Returns the spec invisibly (pipeline-safe). fr_get_*() getters provide programmatic read access to every spec component for QC scripts. is.fr_spec() / is.fr_col() test object types.
-
fr_validate() - Validate a Table Specification Before Rendering
-
fr_get_data() - Get the Data Frame from a Spec
-
fr_get_columns() - Get Column Specifications from a Spec
-
fr_get_col() - Get a Single Column Specification
-
fr_get_titles() - Get Titles from a Spec
-
fr_get_footnotes() - Get Footnotes from a Spec
-
fr_get_page() - Get Page Configuration from a Spec
-
fr_get_rules() - Get Rules from a Spec
-
fr_get_styles() - Get Cell Styles from a Spec
-
is.fr_spec() - Test if an Object is an fr_spec
-
is.fr_col() - Test if an Object is an fr_col
Built-in Datasets
Synthetic CDISC ADaM datasets from study TFRM-2024-001 (135 subjects, Zomerane vs placebo). Raw ADaM: adsl, adae, adtte, adcm, advs. Pre-summarized TFL-ready: tbl_demog, tbl_ae_soc, tbl_ae_summary, tbl_disp, tbl_tte, tbl_cm, tbl_vs – each ready for direct use with fr_table().
-
adsl - Subject Level Analysis Dataset (ADSL)
-
adae - Adverse Events Analysis Dataset (ADAE)
-
adtte - Time to Event Analysis Dataset (ADTTE)
-
adcm - Concomitant Medications Analysis Dataset (ADCM)
-
advs - Vital Signs Analysis Dataset (ADVS)
-
tbl_demog - Demographics and Baseline Characteristics Table (Table 14.1.1)
-
tbl_ae_soc - Adverse Events by System Organ Class Table (Table 14.3.1.2)
-
tbl_ae_summary - Overall Adverse Event Summary Table (Table 14.3.1.1)
-
tbl_disp - Subject Disposition Table (Table 14.1.3)
-
tbl_tte - Time-to-Event Summary Table (Table 14.2.1.1)
-
tbl_cm - Concomitant Medications Table (Table 14.4.1)
-
tbl_vs - Vital Signs Change from Baseline Table (Table 14.3.5.1)