Build a manuscript-oriented table bundle from summary() outputs
Source: R/api-reports.R
build_summary_table_bundle.RdBuild a manuscript-oriented table bundle from summary() outputs
Usage
build_summary_table_bundle(
x,
which = NULL,
appendix_preset = NULL,
include_empty = FALSE,
digits = 3,
top_n = 10,
preview_chars = 160
)Arguments
- x
An
mfrm_fit,mfrm_diagnostics,mfrm_precision_review,mfrm_fit_measures,mfrm_facets_fit_review,mfrm_person_fit_indices,mfrm_data_description,mfrm_reporting_checklist,mfrm_apa_outputs,mfrm_design_evaluation,mfrm_signal_detection,mfrm_recovery_simulation,mfrm_recovery_assessment,mfrm_population_prediction,mfrm_future_branch_active_branch,mfrm_facets_run,mfrm_bias,mfrm_anchor_review,mfrm_linking_review,mfrm_misfit_casebook,mfrm_model_choice_review,mfrm_weighting_review,mfrm_unit_prediction, ormfrm_plausible_valuesobject, one of theirsummary()outputs, or asummary.mfrmr_recovery_validationobject from the packaged validation protocol.- which
Optional character vector selecting a subset of named tables.
- appendix_preset
Optional appendix-oriented table preset:
"all","recommended","compact","methods","results","diagnostics", or"reporting". Cannot be combined withwhich. Section-aware presets keep returned tables whose bundle catalog maps to the requested appendix section.- include_empty
If
TRUE, retain empty tables in the returned bundle.- digits
Digits forwarded when
summary()must be computed from a raw object.- top_n
Row cap forwarded to compact
summary()methods whenxis a raw object.- preview_chars
Character cap forwarded to
summary.mfrm_apa_outputs()whenxis a raw APA-output object.
Value
An object of class mfrm_summary_table_bundle with:
overviewtable_indexplot_indextablesappendix_presetnotessource_classsummary_class
Details
This helper turns the package's compact summary objects into a reproducible
table bundle for manuscript drafting, appendix handoff, or downstream
formatting. It does not replace apa_table(); instead, it provides a
consistent bridge from summary() to named data.frame components that can
later be rendered with apa_table() or exported directly.
The public entry point validates x and the summary-object contract up
front, so malformed summaries fail with a package-level message instead of
falling through to opaque downstream errors.
The function first normalizes x through the corresponding summary()
method when needed, then records a table_index describing every available
table and returns the selected tables in tables. Optional appendix presets
can be applied at bundle-construction time when you want a conservative
manuscript-facing subset before plotting or export.
Supported inputs
fit_mfrm()orsummary(fit)diagnose_mfrm()orsummary(diag)precision_review_report()orsummary(precision_review)fit_measures_table()orsummary(fit_measures)facets_fit_review()orsummary(facets_fit_review)compute_person_fit_indices()orsummary(person_fit)describe_mfrm_data()orsummary(ds)reporting_checklist()orsummary(chk)build_apa_outputs()orsummary(apa)evaluate_mfrm_design()orsummary(sim_eval)evaluate_mfrm_signal_detection()orsummary(sig_eval)evaluate_mfrm_recovery()orsummary(rec)assess_mfrm_recovery()orsummary(rec_assessment)summary(validation)fromrecovery-validation.Rpredict_mfrm_population()orsummary(pred)planning_schema$future_branch_active_branchorsummary(...)run_mfrm_facets()orsummary(out)estimate_bias()orsummary(bias)review_mfrm_anchors()orsummary(review)build_linking_review()orsummary(review)build_misfit_casebook()orsummary(casebook)build_model_choice_review()orsummary(review)build_weighting_review()orsummary(review)predict_mfrm_units()orsummary(pred_units)sample_mfrm_plausible_values()orsummary(pv)
Interpreting output
overview: one-row metadata about the source summary and table counts.table_index: table names, dimensions, roles, and manuscript-oriented descriptions.plot_index: which returned tables contain numeric content and which bundle-level plot types can use them directly.tables: nameddata.frameobjects ready for formatting or export.appendix_preset: active appendix subset mode ("none"when not used).notes: short guidance about omitted empty tables or source-level caveats.fit-level caveats use the
analysis_caveatsrole; pre-fit data score-support caveats use thescore_category_caveatsrole. Both roles are classified as diagnostics and stay inrecommendedappendix subsets.recovery-assessment and recovery-validation summaries expose
diagnostic_reporting_notesbeforediagnostic_reviewordiagnostic_oc_summaryso fit/separation caveats can be reported without treating them as recovery or release gates.recovery-validation summaries expose
condition_reporting_notesbeforecondition_summaryso GPCM generator stress and sparse score support are not mistaken for recovery-metric failures.precision-review summaries expose
fit_separation_basisso fit, ZSTD, separation/reliability/strata, and QC thresholds remain separate reporting surfaces rather than implicit validation gates.fit-measure and FACETS fit-review summaries expose df/ZSTD sensitivity tables under precision-review roles, keeping MnSq status, ZSTD standardization, and external FACETS matching distinct in appendix handoffs.
latent-regression fit summaries expose
population_codingin the methods appendix role so categorical levels, contrasts, and encoded columns can be documented with the coefficient table.model-choice-review summaries expose
comparison_table,model_roles,downstream_routes, andreport_templatesso RSM/PCM versus boundedGPCMcomparisons remain tied to their equal-weighting, sensitivity, and reporting-boundary roles.
Typical workflow
Build a compact object with
summary(...).Convert it with
build_summary_table_bundle(...).Use
bundle$tables[[...]]directly, or hand a selected table toapa_table()for formatted manuscript output.If you want a manuscript appendix subset up front, use a preset such as
appendix_preset = "recommended","compact", or"diagnostics".For recovery-assessment or recovery-validation summaries, inspect
bundle$tables$reading_orderfirst when it is available.For recovery-assessment or recovery-validation summaries with retained diagnostics, read
diagnostic_reporting_notesbefore the rawdiagnostic_reviewordiagnostic_oc_summary. Readcondition_reporting_notesbeforecondition_revieworcondition_summarywhen boundedGPCMgenerator stress is part of the plan.
Examples
if (FALSE) { # \dontrun{
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
method = "JML", maxit = 30
)
bundle <- build_summary_table_bundle(fit)
bundle$table_index
summary(bundle)$role_summary
} # }
# Recovery-validation output can be converted to appendix-ready tables.
if (FALSE) { # \dontrun{
source(system.file("validation", "recovery-validation.R", package = "mfrmr"))
validation <- mfrmr_run_recovery_validation(
case_ids = c("gpcm_slope_profile", "gpcm_high_dispersion_sparse"),
quick = TRUE,
seed = 20260525
)
validation_bundle <- build_summary_table_bundle(summary(validation))
validation_bundle$tables$reading_order
validation_bundle$tables$topline_release_decision
validation_bundle$tables$condition_reporting_notes
validation_bundle$tables$condition_summary
validation_bundle$tables$diagnostic_reporting_notes
} # }