Skip to content

[v0.6] Table 1 bootstrap adapter (strict-schema v1) #41

Description

@DougManuel

Part of the post-v0.4.0 development plan (development/post-v040-development-plan.md, Phase 3, Task 9).

Context

The third input adapter anticipated by the v0.4 architecture (design-philosophy-v04.qmd "What is deliberately deferred"; ADR "Open Follow-Up Decisions"): take published descriptive statistics (a "Table 1") and produce a mock_spec.

Why it matters: teaching and pipeline testing from published statistics, without raw-data access — students and collaborators (including LMIC settings without data-sharing agreements) can build and test against realistic marginals. This is the most distinctive item on the roadmap.

v1 scope — strict input schema only

A tidy data frame in, mock_spec out:

column type notes
variable chr variable name
type chr "categorical" / "continuous"
level chr categorical only; one row per level
prop dbl categorical only
mean, sd dbl continuous only (maps to existing normal support)
min, max dbl continuous range

Constructor: mock_spec_from_table1(table1_df) — validation errors name the offending row/column.

Explicit v1 exclusions

  • No median/IQR → distribution conversion (later, with a documented heuristic).
  • No stratified/grouped panels.
  • No parsing of documents, PDFs, or free text — that is a separate tool (possibly an LLM-assisted workflow outside the package).
  • Scope guard: outputs match marginals for testing/teaching plausibility. This is not synthetic data for inference or release — same boundary as cran-comments.md and the design philosophy. Vignette must state this.

Acceptance

  • Adapter + validation + tests; round-trip vignette (paper table → mock data → summary table comparison).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Nice to have, lower urgency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions