Package: junco 0.1.6

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.6.tar.gz
junco_0.1.6.zip(r-4.7)junco_0.1.6.zip(r-4.6)junco_0.1.6.zip(r-4.5)
junco_0.1.6.tgz(r-4.6-any)junco_0.1.6.tgz(r-4.5-any)
junco_0.1.6.tar.gz(r-4.7-any)junco_0.1.6.tar.gz(r-4.6-any)
junco_0.1.6.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.35 score 9 stars 1 packages 304 scripts 704 downloads 142 exports 173 dependencies

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

TargetResultTimeFilesSyslog
linux-devel-x86_64OK404
source / vignettesOK367
linux-release-x86_64OK398
macos-release-arm64OK338
macos-oldrel-arm64OK309
windows-develOK317
windows-releaseOK321
windows-oldrelOK330
wasm-releaseOK249

Exports:a_cmhrms_ja_cmhrms_j_with_excludea_coxph_hra_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_rbmi_lsmeansa_relative_riska_summarize_ancova_ja_summarize_aval_chg_diff_ja_summarize_ex_ja_summarize_mmrma_summary_diff_mvarsa_summary_diff_mvars_labela_summary_ja_test_proportion_diffa_two_tierac_blank_lineanalyze_valuesbspt_prunerbuild_formulac_proportion_logicalc_summary_subset_labelcheck_wrap_nobreakcmp_cfuncmp_split_funcolumn_statscond_rm_facetscount_prunercreate_colspan_mapcreate_colspan_vardef_colwidthsdefault_str_mapdo_exclude_splitexport_TLG_as_docxfilter_df_prior_afunfind_missing_chg_after_avisitfit_ancovafit_mmrm_jformat_statsget_mmrm_lsmeansget_ref_infoget_titles_from_fileget_visit_levelsgrouped_cols_w_diffsh_extract_coxreg_multivarh_get_design_math_get_trtvar_refpathh_tidy_poolinches_to_spacesinsert_blank_linejj_complex_scorefunjjcs_num_formatsjjcsformat_cnt_den_fract_fctjjcsformat_count_denom_fractionjjcsformat_count_fractionjjcsformat_fraction_count_denomjjcsformat_pval_fctjjcsformat_range_fctjjcsformat_xxjunco_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_jpostfun_eq5dprepend_label_cellprop_ratio_cmhprop_split_funprop_table_afunrbmi_analyserbmi_ancovarbmi_ancova_singlerbmi_mmrmrbmi_poolreal_add_overall_facetremove_col_countremove_rowsresp01_a_comp_stat_factorresp01_a_comp_stat_logicalresp01_acfunresp01_counts_cfunresp01_split_fun_fctresponse_by_varrm_levelss_ancova_js_cmhrms_js_coxph_hrs_diff_mean_cis_event_frees_freq_js_lsmeanss_odds_ratio_js_proportion_diff_js_proportion_factors_proportion_logicals_rbmi_lsmeanss_relative_risks_summarize_ancova_js_summarize_mmrms_summary_diffsafe_prune_tablesafe_t_testset_titlesstring_to_titlesummarize_coxreg_multivarsummarize_lsmeans_widesummarize_row_countstheme_docx_default_jtt_to_flextable_jtt_to_tbldftt_to_tlgrtfvar_relabel_list

Dependencies:abindAsioHeadersaskpassassertthatbackportsbase64encbigDbitopsbootbriobroombslibcacachemcallrcarcarDatacellrangercheckmatechromoteclicolorspacecommonmarkcowplotcpp11crayoncurldata.tableDerivdescdiffobjdigestdoBydplyremmeansestimabilityevaluatefansifarverfastmapflextablefontawesomefontBitstreamVerafontLiberationfontquiverforcatsforecastformattersFormulafracdifffsgdtoolsgenericsggplot2gluegnmgridExtragtgtablehighrhmshtmltoolshtmlwidgetshuxtableigraphisobandjinjarjquerylibjsonlitejuicyjuiceknitrlabelinglaterlatticelifecyclelitedownlme4lmtestmagrittrmarkdownMASSMatrixMatrixModelsmemoisemgcvmicrobenchmarkmimeminqammrmmodelrmvtnormnestcolornlmenloptrnnetnumDerivofficeropensslotelpbkrtestpillarpkgbuildpkgconfigpkgloadpngpraiseprettyunitsprocessxprogresspromisespspurrrquantregqvcalcR6raggrappdirsrbibutilsrbmiRColorBrewerRcppRcppArmadilloRcppEigenRdpackreactablereactRreadxlreformulasrelimprematchrlangrlistingsrmarkdownrprojrootrstudioapirtablesrtables.officerS7sassscalesSparseMstringistringrsurvivalsyssystemfontsterntestthattextshapingtibbletidyrtidyselecttidytlgtimeDatetinytexTMBurcautf8uuidV8vcdvcdExtravctrsviridisLitewaldowebshot2websocketwithrxfunxml2yamlzipzoo

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

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-05-11
Started: 2025-06-30

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

Last update: 2026-05-11
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-05-11
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-01-21
Started: 2025-06-30

Readme and manuals

Help Manual

Help pageTopics
Exposure-Adjusted Incidence Ratea_eair100_j
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
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
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
Descriptive Statistics for Multiple Univariate Variables with Optional Reference-Based Comparisona_summary_diff_mvars a_summary_diff_mvars_label
Wrapper around 'tern::a_summary()' with junco-specific defaultsa_summary_j
Two Tier Analysis Functiona_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
Summary Statistics for Filtered Data with Labelc_summary_subset_label
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_fraction jjcsformat_fraction_count_denom
Count Prunercount_pruner
Workaround statistics function to add HR with CIa_coxph_hr coxph_hr s_coxph_hr
Creation of Column Spanning Mapping Dataframecreate_colspan_map
Creation of Column Spanning Variablescreate_colspan_var
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
Filter Data Prior To Analysis Functionfilter_df_prior_afun
Helper for Finding AVISIT after which CHG are all Missingfind_missing_chg_after_avisit
'ANCOVA' Analysisfit_ancova
'MMRM' Analysisfit_mmrm_j
Extract Least Square Means from 'MMRM'get_mmrm_lsmeans
Obtain Reference Information for a Global Reference Groupget_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
Get Treatment Variable Reference Pathh_get_trtvar_refpath
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
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
Post-processing split function for EQ-5D style column statisticspostfun_eq5d
Prepend Label Row to Analysis Outputprepend_label_cell
Proportion difference estimationa_proportion_diff_j prop_diff s_proportion_diff_j
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
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
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
Removal of Levelsrm_levels
rm_other_facets_factrm_other_facets_fact
Junco Extended ANCOVA Functions_ancova_j
Difference in Means with Confidence Intervals_diff_mean_ci
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
Safe Wrapper for 'stats::t.test()'safe_t_test
Set Output Titlesset_titles
Layout Generating Function for TEFOS03 and Related Cox Regression Layoutssummarize_coxreg_multivar
Dynamic tabulation of MMRM results with tablesa_summarize_mmrm summarize_mmrm s_summarize_mmrm
Layout Creating Function Adding Row Countssummarize_row_counts
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
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