Package: junco 0.1.7009

Gabriel Becker

junco: Create Common Tables and Listings Used in Clinical Trials

Structure and formatting requirements for clinical trial table and listing outputs vary between pharmaceutical companies. 'junco' provides additional tooling for use alongside the 'rtables', 'rlistings' and 'tern' packages when creating table and listing outputs. While motivated by the specifics of Johnson and Johnson Clinical and Statistical Programming's table and listing shells, 'junco' provides functionality that is general and reusable. Major features include a) alternative and extended statistical analyses beyond what 'tern' supports for use in standard safety and efficacy tables, b) a robust production-grade Rich Text Format (RTF) and DOCX exporter for tables, listings and graphs, c) structural support for spanning column headers and risk difference columns in tables, and d) robust font-aware automatic column width algorithms for both listings and tables.

Authors:Gabriel Becker [cre, aut], Ilse Augustyns [aut], Paul Jenkins [aut], Daniel Hofstaedter [aut], Joseph Kovach [aut], David Munoz Tord [aut], Daniel Sabanes Bove [aut], Ezequiel Anokian [ctb], Renfei Mao [ctb], Mrinal Das [ctb], Wojciech Wójciak [ctb], Johnson & Johnson Innovative Medicine [cph, fnd]

junco_0.1.7009.tar.gz
junco_0.1.7009.zip(r-4.7-any)junco_0.1.7009.zip(r-4.6-any)junco_0.1.7009.zip(r-4.5-any)
junco_0.1.7009.tgz(r-4.6-any)junco_0.1.7009.tgz(r-4.5-any)
junco_0.1.7009.tar.gz(r-4.7-any)junco_0.1.7009.tar.gz(r-4.6-any)
junco_0.1.7009.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
junco/json (API)

# Install 'junco' in R:
install.packages('junco', repos = c('https://johnsonandjohnson.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/johnsonandjohnson/junco/issues

Pkgdown/docs site:https://johnsonandjohnson.github.io

On CRAN:

Conda:

9.50 score 11 stars 1 packages 310 scripts 555 downloads 172 exports 172 dependencies

Last updated from:f723458abf. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK400
source / vignettesOK368
linux-releaseOK390
macos-releaseOK260
macos-oldrelOK273
windows-develOK310
windows-releaseOK357
windows-oldrelOK297
wasm-releaseOK228

Exports:a_cmhrms_ja_cmhrms_j_with_excludea_combo_prop_diff_pval_mfa_cond_proportion_ja_coxph_hra_diff_meansa_eair_strat_ja_eair100_ja_event_freea_freq_combos_ja_freq_ja_freq_j_with_excludea_freq_resp_var_ja_freq_subcol_ja_kaplan_meiera_lsmeansa_maxleva_odds_ratio_ja_patyrs_ja_proportion_ci_factora_proportion_ci_logicala_proportion_diff_ja_proportion_diff_mfa_rbmi_lsmeansa_relative_riska_sum_ratio_ja_summarize_ancova_ja_summarize_aval_chg_diff_ja_summarize_ex_ja_summarize_mmrma_summarize_mmrm_with_excludea_summary_j_with_excludea_summary_subseta_test_proportion_diffa_test_proportion_diff_mfa_three_tiera_two_tierac_blank_lineanalyze_valuesbspt_prunerbuild_formulac_proportion_logicalc_summary_subset_labelcategorize_pvalcheck_wrap_nobreakcmp_cfuncmp_split_funcolumn_statscompare_fmt_specscond_rm_facetscount_prunercreate_colspan_mapcreate_colspan_varcur_col_split_pathd_cond_proportion_jdef_colwidthsdefault_str_mapdo_exclude_splitexport_TLG_as_docxfactor_by_orderfind_missing_chg_after_avisitfit_ancovafit_mmrm_jfmt_spec_df_dfmt_spec_single_dfmt_spec_var_dformat_sigfig_jformat_statsget_fmt_detailsget_mmrm_lsmeansget_ref_infoget_titles_from_fileget_visit_levelsgrouped_cols_w_diffsgrouped_cols_w_subgrpsh_extract_coxreg_multivarh_get_design_math_tidy_poolin_columninches_to_spacesinsert_blank_linejj_complex_scorefunjjcs_num_formatsjjcsformat_cnt_den_fract_fctjjcsformat_count_denom_fractionjjcsformat_count_denom_fraction_legacyjjcsformat_count_fractionjjcsformat_fractionjjcsformat_fraction_count_denomjjcsformat_fraction_count_denom_legacyjjcsformat_pval_fctjjcsformat_range_fctjjcsformat_xxjunco_def_d_alljunco_def_d_alt1junco_def_d_alt2junco_default_formatsjunco_default_indentsjunco_default_labelsjunco_default_statsjunco_get_formats_from_statsjunco_get_indents_from_statsjunco_get_labels_from_statsjunco_get_statskeep_non_null_rowsleftsidelisting_column_widthslsmeans_wide_cfunlsmeans_wide_first_split_fun_fctlsmeans_wide_second_split_fun_fctmake_combo_splitfunmake_dflt_comp_mapmake_multicomp_splfunmake_rbmi_clusterno_data_to_report_stror_clogit_jor_cmhor_glm_jpool_rubin_scalarpool_z_statprepend_label_cellprop_ratio_cmhprop_split_funprop_table_afunrbmi_analyserbmi_ancovarbmi_ancova_singlerbmi_mmrmrbmi_poolreal_add_overall_facetremove_col_countremove_rowsresp_multiple_imputationresp01_a_comp_stat_factorresp01_a_comp_stat_logicalresp01_acfunresp01_counts_cfunresp01_split_fun_fctresponse_by_varrightsiderm_levelss_ancova_js_cmhrms_js_cond_proportion_js_diff_meanss_event_frees_freq_js_lsmeanss_odds_ratio_js_proportion_diff_mfs_proportion_factors_proportion_logicals_rbmi_lsmeanss_relative_risks_summarize_ancova_js_summarize_mmrms_summary_diffs_test_proportion_diff_mfsafe_prune_tableset_titlesshift_tbl_col_structsome_v_all_col_structstats_in_cols_setupstring_to_titlesummarize_coxreg_multivarsummarize_lsmeans_widesummarize_row_countstheme_docx_default_jtt_to_flextable_jtt_to_tbldftt_to_tlgrtfvar_relabel_list

Dependencies:abindAsioHeadersaskpassassertthatbackportsbase64encbigDbitopsbootbriobroombslibcacachemcallrcarcarDatacellrangercheckmatechromoteclicolorspacecommonmarkcowplotcpp11crayoncurldata.tableDerivdescdiffobjdigestdoBydplyremmeansestimabilityevaluatefansifarverfastmapflextablefontawesomefontBitstreamVerafontLiberationfontquiverforcatsforecastformattersFormulafracdifffsgdtoolsgenericsggplot2gluegnmgridExtragtgtablehighrhmshtmltoolshtmlwidgetshuxtableigraphisobandjinjarjquerylibjsonlitejuicyjuiceknitrlabelinglaterlatticelifecyclelitedownlme4lmtestmagrittrmarkdownMASSMatrixMatrixModelsmemoisemgcvmimeminqammrmmodelrmvtnormnestcolornlmenloptrnnetnumDerivofficeropensslotelpbkrtestpillarpkgbuildpkgconfigpkgloadpngpraiseprettyunitsprocessxprogresspromisespspurrrquantregqvcalcR6raggrappdirsrbibutilsrbmiRColorBrewerRcppRcppArmadilloRcppEigenRdpackreactablereactRreadxlreformulasrelimprematchrlangrlistingsrmarkdownrprojrootrstudioapirtablesrtables.officerS7sassscalesSparseMstringistringrsurvivalsyssystemfontsterntestthattextshapingtibbletidyrtidyselecttidytlgtimeDatetinytexTMBurcautf8uuidV8vcdvcdExtravctrsviridisLitewaldowebshot2websocketwithrxfunxml2yamlzipzoo

TrueType-Aware Automatic Column Widths
Introduction | Tables | Pagination Assumptions | Algorithm And Optimality Criterion | Examples | Listings | Optimality Criterion | Algorithm | Candidate Column Widths | Selecting The Optimal Set Of Widths | Example

Last update: 2026-10-14
Started: 2025-06-30

Formatting function for significant figures
Overview | Significant Figures and Company Specific Requirements | Basic Examples of Formatting Function Factory format_sigfig_j | Formats based upon junco::format_sigfig_j in rtables Layout | Example as in Tern TLG Catalog using analyze_vars_in_cols | Same Example with junco afun column_stats

Last update: 2026-10-14
Started: 2026-10-14

Formatting tools to simplify adjustment of decimal precision
Overview | d-Style Based Format Specifications | Overview of Most Relevant Functions | Examples | Working Example 1: Table with Multiple Variables Analyzed with Different Precision (e.g. Demography Table) | Working Example 2: Table with Multiple Parameters Analyzed with Different Precision (e.g. Lab/Vital Signs Table) | Working Example 3: Table with Parameters Analyzed with d = 2 Precision rather than default of d = 1 (e.g. Lab/Vital Signs Table) | Working Example 4: Table with Multiple Parameters Analyzed with Different Precision, with statistics presented in columns (e.g. Lab/Vital Signs Table) | Requirements for afuns

Last update: 2026-10-14
Started: 2026-10-14

Reference Group Handling with get_ref_info
Overview | The ref_path Convention | Basic Usage | Working Example: AE Table with Risk Difference Columns | How get_ref_info Works Internally | Wildcard Matching with in_column() | Relationship to h_get_cur_trt_grp | Inspecting Column Paths

Last update: 2026-10-14
Started: 2026-10-14

Standard Column Structures
Structures With Difference Columns | Basic Usage | A Note About Types Of Differences | Turning Off The Difference Columns | Advanced Usage | Including Virtual Combination Arms | Direct Control Of Comparisons | Other Standard Column Structures | Subgroup Column Structures | Quartiles As A Special Case Of Subgrouping | Shift Table Column Structure | Some Vs All Column Structure

Last update: 2026-10-14
Started: 2026-05-11

Table & Listing Customizations
Introduction | Page Orientation (Portrait vs. Landscape) | Table .rtf File | Table .docx File | Visual Output (HTML Representation) | Adjusting the Font Size of a Table or Listing | Adding a Spanning Column Header to a Table | Adding a Combined Column to a Table | Inserting a New Line within Table & Listing Text | Listing .rtf File | Listing .docx File | Custom Table Column Header Border Matrix | Addition of Superscript or Other Symbol | Grouping of Columns for Tables Containing Many Columns | Inserting Page Breaks in Tables | Manually Splitting Large Listing Files into Multiple Smaller Files | Listing .rtf File 2 | Listing .docx File 2

Last update: 2026-10-14
Started: 2026-05-11

Tabulation
junco Tabulation | junco Analysis Functions | Tabulation Examples using a_freq_j | Minor differences between current table and a similar table using tern analyze functions. | a_freq_j supports various methods for the risk difference column. | Creation of Subgroup tables with a_freq_j | Other junco features : Extra Statistics have been added to some tern statistical functions | Tabulation Examples using a_summarize_aval_chg_diff_j

Last update: 2026-10-14
Started: 2025-06-30

ANCOVA with Combined Treatment Groups
Overview | Clinical Context | Example Dataset | Combined Column Strategy | ANCOVA Model | Least-squares means approach | Weighting Strategies | Collapsing Treatment Arms | Summary | Statistical Appendix: emmeans-based Estimation | Notation | A. Combined LS Means | Variance | B. Contrasts Between Treatment Groups | Simple Treatment Differences | Differences Involving Combined Arms | C. Contrasts in Interaction Models

Last update: 2026-05-11
Started: 2026-05-11

Readme and manuals

Help Manual

Help pageTopics
Combined Proportion, Risk Difference, and Risk Difference Test Analysis Function with Method Selection Based on the Mantel-Fleiss Criteriona_combo_prop_diff_pval_mf
Conditional proportion with adaptive CI (exact vs. Wald)a_cond_proportion_j cond_proportion_j d_cond_proportion_j s_cond_proportion_j
a_coxph_hra_coxph_hr
Analysis function count and percentage in column design controlled by combosdfa_freq_combos_j
Analysis/statistical function for count and percentage in core columns and (optional) relative risk columnsa_freq_j a_freq_j_with_exclude s_freq_j
Analysis Function for Response Variablesa_freq_resp_var_j
Analysis function count and percentage with extra column-subsetting in selected columns (controlled by subcol_* arguments)a_freq_subcol_j
a_kaplan_meiera_kaplan_meier
Calculate Count and Percentage of the Maximum Level of an Ordered Factor per Subject.a_maxlev
Formatted Analysis Function For Proportion Confidence Interval for Factora_proportion_ci_factor
Formatted Analysis Function For Proportion Confidence Interval for Logicala_proportion_ci_logical
Relative risk estimationa_relative_risk relative_risk s_relative_risk
Analysis Function: Sum and Ratio of Sumsa_sum_ratio_j
ANCOVA Summary Functiona_summarize_ancova_j s_summarize_ancova_j
Analysis function 3-column presentationa_summarize_aval_chg_diff_j
Tabulation for Exposure Tablesa_summarize_ex_j s_summarize_ex_j
Wrappers Around 'tern::a_summary()' with Row Split Exclusiona_summary_j a_summary_j_with_exclude
Two Tier Analysis Functiona_three_tier a_two_tier
Analysis and Content Summary Function Producing Blank Lineac_blank_line
Shortcut Layout Function for Standard Continuous Variable Analysisanalyze_values
Pruning Function for pruning based on a fraction and/or a difference from the control armbspt_pruner
Building Model Formulabuild_formula
c_function for proportion of 'TRUE' in logical vectorc_proportion_logical
Categorize p-valuescategorize_pval
Check Word Wrappingcheck_wrap_nobreak
Cochran-Mantel-Haenszel Row Mean Scores testa_cmhrms_j a_cmhrms_j_with_exclude cmhrms s_cmhrms_j
Summary Analysis Function for Compliance Columnscmp_cfun
Split Function for Compliance Columnscmp_post_fun cmp_split_fun
Statistics within the column spacecolumn_stats
Conditional Removal of Facetscond_rm_facets
Formatting functions for count and fraction, and for count denominator and fraction valuescount and fraction related formatting functions jjcsformat_cnt_den_fract_fct jjcsformat_count_denom_fraction jjcsformat_count_denom_fraction_legacy jjcsformat_count_fraction jjcsformat_fraction_count_denom jjcsformat_fraction_count_denom_legacy
Count Prunercount_pruner
Creation of Column Spanning Mapping Dataframecreate_colspan_map
Creation of Column Spanning Variablescreate_colspan_var
Utilities for the Current Column Split Pathcur_col_split_path cur_col_split_path_utils in_column
Difference in Meansa_diff_means diff_means s_diff_means
Predicate to Check if Split Should be Excludeddo_exclude_split
Workaround statistics function to time point survival estimate with CIa_event_free event_free s_event_free
Export a VTableTree or a listing_df object into docxexport_as_docx_j
export_graph_as_docxexport_graph_as_docx
Export a TLG (Table, Listing, Graph) to .docx formatexport_TLG_as_docx
Create a factor with levels ordered by a separate ordering vectorfactor_by_order
Helper for Finding AVISIT after which CHG are all Missingfind_missing_chg_after_avisit
'ANCOVA' Analysisfit_ancova
'MMRM' Analysisfit_mmrm_j
Utilities for processing d-style string formatting specifications (eg "xx.dx")fmt_spec_d fmt_spec_df_d fmt_spec_single_d fmt_spec_var_d junco_def_d_all junco_def_d_alt1 junco_def_d_alt2
Utilities for reviewing format specification objectscompare_fmt_specs fmt_utils get_fmt_details
Extract Least Square Means from 'MMRM'get_mmrm_lsmeans
Obtain reference group information from split context.get_ref_info
Get Titles/Footers For Table From Sourcesget_titles_from_file
Get Visit Levels in Order Defined by Numeric Versionget_visit_levels
Standard Column Structure With Grouped Treatments and Difference Columnsgrouped_cols_w_diffs grouped_cols_w_subgrps
Helper functions for odds ratio estimationh_odds_ratio or_clogit_j or_cmh or_glm_j
Conversion of inches to spaces.inches_to_spaces
Insertion of Blank Lines in a Layoutinsert_blank_line
Complex Scoring Functionjj_complex_scorefun
Numeric Formatting Functionjjcs_num_formats
Formatting function for percentage valuesjjcsformat_fraction
Utility for specifying custom formatsjjcsformat_pval_fct jjcsformat_range_fct jjcsformat_xx
Pruning Function to accommodate removal of completely NULL rows within a tablekeep_non_null_rows
Extract the left-hand side of a formulaleftside
Define Column Widthsdef_colwidths listing_column_widths
Layout Generating Function for LS Means Wide Table Layoutslsmeans_wide_cfun lsmeans_wide_first_split_fun_fct lsmeans_wide_second_split_fun_fct summarize_lsmeans_wide
Split Function Helpermake_combo_splitfun
Make Multi-comparator Split Functionmake_dflt_comp_map make_multicomp_splfun
Create a 'rbmi' ready clustermake_rbmi_cluster
Odds ratio estimationa_odds_ratio_j odds_ratio s_odds_ratio_j
Parallelise Lapplypar_lapply
Pool a scalar estimate across imputationspool_rubin_scalar
Pool z statistics across imputationspool_z_stat
Prepend a Label Row to a RowsVerticalSection Objectprepend_label_cell
Proportion difference estimationa_proportion_diff_j prop_diff
Difference test for two proportionsa_test_proportion_diff prop_diff_test
Split Function for Proportion Analysis Columnsprop_post_fun prop_split_fun
Relative Risk CMH Statisticprop_ratio_cmh
Formatted Analysis Function for Proportion Analysisprop_table_afun
Proportion Difference with Method Selection Based on the Mantel-Fleiss Criteriona_proportion_diff_mf proportion_diff_mf s_proportion_diff_mf
Analyse Multiple Imputed Datasetsrbmi_analyse
Analysis of Covariancerbmi_ancova
Implements an Analysis of Covariance (ANCOVA)rbmi_ancova_single
MMRM Analysis for Imputed Datasetsrbmi_mmrm
Extract Single Visit Information from a Fitted MMRM for Multiple Imputation Analysisrbmi_mmrm_single_info
Pool analysis results obtained from the imputed datasetsrbmi_pool
Add Overall Facetreal_add_overall_facet
Removal of Unwanted Column Countsremove_col_count
Pruning function to remove specific rows of a table regardless of countsremove_rows
Calculate results across binary-imputation scenariosresp_multiple_imputation
Formatted Analysis Function for Comparative Statistic in Response Tables (RESP01)resp01_a_comp_stat_factor
Formatted Analysis Function for Comparative Statistic in Response Tables (RESP01)resp01_a_comp_stat_logical
Formatted Analysis and Content Summary Function for Response Tables (RESP01)resp01_acfun
Content Row Function for Counts of Subgroups in Response Tables (RESP01)resp01_counts_cfun
Split Function Factory for the Response Tables (RESP01)resp01_split_fun_fct
Count denom fraction statisticresponse_by_var
Extract the right-hand side of a formularightside
Removal of Levelsrm_levels
rm_other_facets_factrm_other_facets_fact
Junco Extended ANCOVA Functions_ancova_j
s_function for proportion of factor levelss_proportion_factor
s_function for proportion of 'TRUE' in logical vectors_proportion_logical
Descriptive Statistics for Univariate Data with Optional Reference Comparisons_summary_diff
Safely Prune Table With Empty Table Message If Neededsafe_prune_table
Set Output Titlesset_titles
Create Column Structure for a J&J-Style Shift Tableshift_tbl_col_struct
Standard All vs Some (e.g. Related AEs) column structuresome_v_all_col_struct
Function factory to be used as Post-processing split function for setup of stats in column structurestats_in_cols_setup
Title Case Conversionstring_to_title
Layout Generating Function for TEFOS03 and Related Cox Regression Layoutssummarize_coxreg_multivar
Dynamic tabulation of MMRM results with tablesa_summarize_mmrm a_summarize_mmrm_with_exclude summarize_mmrm s_summarize_mmrm
Layout Creating Function Adding Row Countssummarize_row_counts
Wrappers Around 'tern::a_summary()' with Optional Subsetting and Labelsa_summary_subset c_summary_subset_label summary_subset
Tabulation of Least Square Means Resultsa_lsmeans s_lsmeans tabulate_lsmeans tidy.tern_model
Tabulation of RBMI Resultsa_rbmi_lsmeans h_tidy_pool s_rbmi_lsmeans tabulate_rbmi
Test of Proportion Difference with Method Selection Based on the Mantel-Fleiss Criteriona_test_proportion_diff_mf s_test_proportion_diff_mf test_proportion_diff_mf
Obtain the default theme for the docxtheme_docx_default_j
Convert a TableTree or a listing_df object to a flextablett_to_flextable_j
Create TableTree as DataFrame via gentlgtt_to_tbldf
TableTree to .rtf Conversiontt_to_tlgrtf