
Package index
-
new_spec_ir() - Construct a typed
spec_irstatistical and simulation specification -
spec_predictor() - Construct a predictor specification
-
spec_interaction() - Construct a two-way interaction term specification
-
is_spec_ir() - Test whether an object is a
spec_ir -
as_spec_ir() - Coerce a list into a
spec_irobject -
migrate_spec_ir() - Migrate a
spec_irobject to the current IR schema version -
spec_design_types() - Supported specification design types
-
spec_schema_path() - Locate the bundled JSON Schema for the
spec_irgrammar -
spec_total_n() - Compute total sample size implied by a
spec_ir -
spec_implied_intercept_sd() - Compute implied level-2 random intercept SD from ICC and outcome scale
-
spec_to_math() - Synthesize mathematical and formula summaries from a
spec_ir
Multi-Scenario Comparison & Template Registry
Compare competing study designs (DEFF, N_eff, power) and manage reusable domain templates.
-
compare_specs() - Compare two or more validated
spec_irstudy designs side by side -
as.data.frame(<spec_comparison>) - Coerce a
spec_comparisonobject to a data frame -
list_spec_templates() - List available built-in and custom
spec_irstudy templates -
use_spec_template() - Instantiate a
spec_irfrom a registered template with optional overrides -
register_spec_template() - Register a validated custom
spec_irtemplate -
unregister_spec_template() - Unregister a custom
spec_irtemplate
Validation, Diffs & Serialization
Schema and statistical sanity guardrails, semantic diffs, and YAML/JSON I/O.
-
validate_spec_ir() - Validate a
spec_irobject against schema and statistical sanity guardrails -
is_valid_spec_ir() - Check whether a
spec_irobject is valid -
assert_valid_spec_ir() - Assert that a
spec_irobject passes all schema and statistical checks -
diff_spec_ir() - Compute a structured semantic diff between two
spec_irobjects -
format_diff_summary() - Format a concise one-line or bullet summary of a
spec_diff -
read_spec_ir() - Read a
spec_irobject from a YAML or JSON file -
write_spec_ir() - Write a
spec_irobject to disk as YAML or JSON -
as_spec_yaml() - Serialize a
spec_irobject to YAML -
as_spec_json() - Serialize a
spec_irobject to JSON -
parse_spec_text() - Parse a
spec_irobject from YAML or JSON text
Natural-Language Translators & Refinement
Compile English descriptions into verified IR with pluggable backends.
-
nl_to_spec() - Translate a natural-language study description into a validated
spec_ir -
refine_spec() - Iteratively refine an existing
spec_irvia natural language -
answer_clarifications() - Apply user answers to structured clarification questions
-
translator_rule() - Construct the offline deterministic rule-based translator backend
-
translator_openai() - Construct an OpenAI-compatible LLM translator backend
-
translator_ollama() - Construct a local Ollama LLM translator backend
-
spec_system_prompt() - Return the strict JSON system prompt used by LLM translator backends
Undo/Redo History Stack
Track validated specification snapshots across visual and conversational edits.
-
spec_history() - Create an undo/redo specification history stack
-
history_push() - Push a validated
spec_irsnapshot onto aspec_historystack -
history_undo() - Undo the most recent change in a
spec_historystack -
history_redo() - Redo a previously undone change in a
spec_historystack -
history_can_undo()history_can_redo()history_current() - Inspect undo/redo availability and current snapshot in a
spec_history -
history_summary() - Summarize all snapshots stored in a
spec_historystack
Dynamic UI Synthesis & bslib/Shiny Modules
Synthesize minimal context-specific controls with bidirectional sync.
-
spec_to_controls() - Synthesize a minimal dynamic UI descriptor from a validated
spec_ir -
patch_spec_from_control() - Apply a single dynamic UI control edit to a
spec_irwith validation -
render_spec_controls_ui() - Render a
spec_ui_descriptorintobslibShiny UI cards -
render_diff_badges_ui() - Render visual diff badges for a
spec_diffobject -
mod_spec_composer_ui() - Natural-Language Specification Composer Shiny Module (UI)
-
mod_spec_composer_server() - Natural-Language Specification Composer Shiny Module (Server)
-
mod_spec_controls_ui() - Dynamic Specification Controls Shiny Module (UI)
-
mod_spec_controls_server() - Dynamic Specification Controls Shiny Module (Server)
-
mod_spec_preview_ui() - Live Specification & Deterministic Codegen Preview Shiny Module (UI)
-
mod_spec_preview_server() - Live Specification & Deterministic Codegen Preview Shiny Module (Server)
Deterministic Compilers, AST Safety & Study Bundles
Compile AST-verified standalone R scripts, Quarto reports, and SHA-256 bundles.
-
compile_r_script() - Deterministically compile a validated
spec_irinto a standalone R script -
compile_quarto_report() - Deterministically compile a validated
spec_irinto a Quarto report (.qmd) -
verify_compiled_r_ast() - Statically verify the AST safety of a compiled R script
-
export_spec_bundle() - Export a self-contained reproducible study bundle from a validated
spec_ir -
verify_spec_bundle() - Verify integrity, schema validity, and AST safety of an exported study bundle
-
run_specshiny_demo() - Launch the bundled
specshinyflagship reference demo Shiny application -
specshiny_demo_app() - Build the flagship
specshinyreference demo Shiny app object -
spec_presets() - Built-in natural-language study presets for the
specshinydemo app