Opens the SurveyBuilder, a self-contained HTML application for visual survey
design. The builder runs client-side without an R session or Shiny server.
Save instruments as .sframe files from the browser and load them into R
with read_sframe().
Arguments
- open
Logical. When
TRUE(the default), the builder HTML file is opened in the system's default web browser withutils::browseURL(). Set toFALSEto return the file path without opening it, which is useful for automated testing.- demo
Optional. A demo name from
sframe_list_demos(). The builder then opens from a temporary copy with that demo's questions, scales and analysis plan already loaded."input_types"shows every input type the builder supports.- instrument
Optional. An
sframeinstrument. The builder then opens from a temporary copy with this instrument loaded, as if it had been opened with the builder's Open button, so its study, designs, amendments and references are kept on the next save. Supplydemoorinstrument, not both.
Value
The path to the builder HTML file, invisibly: the bundled file, or
the temporary copy when demo or instrument is given.
Details
The builder includes a 3-mode interface.
- Build
An item editor with a persistent inspector panel, drag-to-reorder, undo/redo, and autosave to browser localStorage.
- Preview
The deployable survey, the page
export_survey()writes withpreview = TRUEand SurveyStudio's Preview screen shows. Answering, required checks and branching run as a respondent sees them, and nothing is collected: the collector endpoint and the completion redirect are removed.- Plan
A role-based analysis planner with method-specific options, planned outputs, reporting references, and decision rules.
The builder includes a pure-JavaScript SHA-256 fallback for browsers or
security policies where crypto.subtle is unavailable on file://
origins. Saved .sframe files can be loaded and validated with
read_sframe().
See also
launch_studio(), read_sframe(), run_analysis_plan()
Other Design functions:
as_sframe(),
read_sframe(),
sframe_attention_check(),
sframe_branch(),
sframe_choice_set(),
sframe_conjoint_design(),
sframe_get_study(),
sframe_instrument(),
sframe_item(),
sframe_sampling_methods(),
sframe_scale(),
sframe_validation,
validate_sframe(),
write_sframe()
Examples
# Retrieve the builder path for inspection without opening the browser
path <- launch_builder(open = FALSE)
sframe_show(path)
# The same builder with a demo preloaded
path <- launch_builder(demo = "two_group", open = FALSE)
sframe_show(path)
# Or with an instrument of your own
ins <- sframe_demo("likert_scale", preview = FALSE)$instrument
path <- launch_builder(instrument = ins, open = FALSE)
sframe_show(path)