Package: surveyframe 0.4.3

Mohammed Ali Sharafuddin

surveyframe: Survey Instrument Workflows

Provides a design-first survey research workflow. An instrument, an analysis plan declared before data collection, and a measurement or structural model are held together in one typed, integrity-checked object (the 'sframe'), so a study's confirmatory tests are fixed before responses arrive rather than chosen afterward. Includes visual instrument design via a browser-based builder or 'Shiny' studio, export to a self-contained static HTML survey, an embeddable 'Shiny' module, SHA-256 integrity-checked serialisation to the '.sframe' format, multi-page survey rendering with branching logic, response quality checking, scale scoring, psychometric diagnostics, analysis-plan execution, model syntax generation for EFA, CFA, CB-SEM, and PLS-SEM, an interactive response dashboard, codebook generation, and reproducible HTML reporting. Also supports multi-criteria decision analysis (AHP, ANP, DEMATEL, TOPSIS, VIKOR, MOORA, SMART, WASPAS, PROMETHEE II, ELECTRE I), small-sample survey helpers, and text and open-ended response analysis (term and n-gram frequency, keyword in context, co-occurrence and co-occurrence networks, sentiment, document-feature matrices, and topic modelling via LDA or structural topic models).

Authors:Mohammed Ali Sharafuddin [aut, cre]

surveyframe_0.4.3.tar.gz
surveyframe_0.4.3.zip(r-4.7-any)surveyframe_0.4.3.zip(r-4.6-any)surveyframe_0.4.3.zip(r-4.5-any)
surveyframe_0.4.3.tgz(r-4.6-any)surveyframe_0.4.3.tgz(r-4.5-any)
surveyframe_0.4.3.tar.gz(r-4.7-any)surveyframe_0.4.3.tar.gz(r-4.6-any)
surveyframe_0.4.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
surveyframe/json (API)

# Install 'surveyframe' in R:
install.packages('surveyframe', repos = c('https://mohammedalisharafuddin.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mohammedalisharafuddin/surveyframe/issues

Pkgdown/docs site:https://mohammedalisharafuddin.github.io

On CRAN:

Conda:

6.55 score 1 stars 31 scripts 483 downloads 141 exports 5 dependencies

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

TargetResultTimeFilesSyslog
linux-develOK396
source / vignettesOK353
linux-releaseOK303
macos-releaseOK292
macos-oldrelOK233
windows-develOK313
windows-releaseOK351
windows-oldrelOK274
wasm-releaseOK184

Exports:add_modeladd_referencesamend_sframeamendment_loganalysis_syntaxas_sframeassumption_reportbootstrap_cicfa_lavaan_syntaxcfa_syntaxclean_text_responsescodebook_reportcohens_d_cicramers_v_cidescriptives_reportefa_reportefa_solutionefa_syntaxeta_sq_ciexport_google_sheetexport_static_surveyextract_quotesitem_reportlaunch_builderlaunch_builder_demolaunch_dashboardlaunch_dashboard_demolaunch_studiolaunch_studio_demolink_git_commitmissing_data_reportmodel_jsonmodel_report_templatengram_frequencyoutlier_reportposthoc_reportpreview_demoquality_reportread_bibtexread_responsesread_sframeread_sheet_responsesreliability_reportrender_reportrender_resultrender_resultsrender_surveyrun_analysis_plansample_size_planscore_scalessem_lavaan_syntaxseminr_syntaxsensitivity_analysissf_apasf_branchsf_branchessf_checksf_checkssf_choice_setssf_choicessf_conjoint_designsf_constructsf_covariancesf_flaggedsf_idsf_indirectsf_instrumentsf_is_validsf_itemsf_itemssf_labelsf_metasf_missing_columnssf_modelsf_modelssf_objectsf_pathsf_plansf_plan<-sf_problemssf_referencesf_scalesf_scalessframe_aggregate_judgementssframe_analysis_qmdsframe_apa_cellssframe_assemble_pairwisesframe_bibliographysframe_builder_empty_statesframe_builder_state_from_instrumentsframe_builder_validate_draftsframe_codebook_items_displaysframe_collected_weightssframe_decision_optionssframe_demosframe_demo_brandingsframe_demo_datasframe_demo_qmdsframe_demossframe_draw_likert_divergingsframe_draw_mosaicsframe_export_labelledsframe_input_types_demo_datasframe_likert_scale_groupssframe_plot_cooccurrencesframe_plot_cooccurrence_networksframe_plot_correlation_matrixsframe_plot_decision_rankingsframe_plot_dematel_influencesframe_plot_descriptivessframe_plot_efa_loadingssframe_plot_efa_screesframe_plot_group_comparisonsframe_plot_item_chartsframe_plot_likert_matrixsframe_plot_likert_scalesframe_plot_missingnesssframe_plot_ngram_frequencysframe_plot_paired_comparisonsframe_plot_qualitysframe_plot_regression_diagnosticssframe_plot_reliabilitysframe_plot_scale_chartsframe_plot_sentimentsframe_plot_term_frequencysframe_plot_topicssframe_plot_validitysframe_plot_variable_distributionsframe_rated_matrixsframe_referencessframe_result_supplementsframe_save_figuressurvey_module_serversurvey_module_uiterm_contextterm_frequencytheme_surveyframevalidate_modelvalidate_sframevalidity_reportwrite_sframe

Dependencies:askpassjsonliteopensslrlangsys

The visual workflow: SurveyBuilder, SurveyStudio, and the dashboard
Input-types demo | SurveyBuilder: the Analyse mode | SurveyStudio: the screens | Recommended workflow | RStudio Addins | Demo launchers | Standalone builder | Studio workflow hub | Dashboard | Known limitations | Moving files between tools

Last update: 2026-10-25
Started: 2026-05-14

Learn by example: 22 small surveys
Read this as your own field | Which demo do I need? | The shape of every study | Start here: your first survey | Compare groups | Two groups on one outcome | The same people, measured twice | Three groups, a second factor, and a covariate | Scales, structure and models | A scale, and whether it holds together | Factor structure, and a path model | Question types worth meeting | A matrix item, and the columns it becomes | Questions only some people see | Free text | Make it yours | One page, or one question at a time | Collect responses, and share the results | Declare, revise, verify | Changing an instrument mid-study, on the record | Proving a file is the one you think it is | Are you an instructor? Do you want to verify against established software? | Run one yourself | Found a bug, or something that could be clearer?

Last update: 2026-10-25
Started: 2026-08-28

Building a survey instrument: questions, plan, and model
Choice sets | Items and item types | Scales, reverse coding, and minimum valid items | Attention checks | Branching | The analysis plan | Assemble the instrument | Validate the instrument | Cite the sources the instrument draws on | Write and read .sframe files | GUI option

Last update: 2026-10-25
Started: 2026-05-14

Survey design and live results: a tourism services example
About this vignette | The questionnaire | Shared Likert scale | Helper functions | Digital marketing items | Destination service quality items | Destination sustainability quality (DSUQ, 11 items) | Tourist satisfaction (TS, 3 items) and behavioural intention (BI, 3 items) | Demographic items | Scales | Assemble the instrument | Validate and serialise | What the SHA-256 hash proves, and what it does not | .sframe is plain JSON, not a proprietary format | Disclosed revision: amend_sframe() | Linking a saved instrument to its Git commit | Set up data collection | Store the Google Sheets endpoint in the instrument | Export the static HTML survey | What the respondent sees | Generate the Google Sheets collector script | Pull live responses | Simulated responses for offline demonstration | Quality checks | Score and describe | Reliability | EFA readiness | Construct validity | Analysis plan | Assumption checks | Run the analysis plan | Plots on demand | Results report | The live workflow | Summary

Last update: 2026-10-24
Started: 2026-04-16

Analysing survey responses: running the plan
Load the demo | Import responses | Missing data and quality | Score scales | Check assumptions before the plan | Define the plan | Run the plan | Read a single result | Render the results report | In SurveyStudio | Next step

Last update: 2026-09-22
Started: 2026-05-14

Deploying a survey and collecting responses on free hosting
What you need | Step 1: Create the Google Sheet and the collector | Step 2: Deploy the collector as a web app | Step 3: Put the endpoint into the survey | Step 4a: Host on GitHub Pages | Step 4b: Host on Blogger | Step 5: Read the responses back | Updating a live survey | Checklist

Last update: 2026-09-22
Started: 2026-06-14

Small-sample inference
When is a sample "small"? | Planning a small-sample study | Reading the advisory | Mann-Whitney with the Hodges-Lehmann estimate | Paired Wilcoxon with the pseudomedian CI | Fisher's exact test with the exact odds-ratio CI | Bootstrap confidence interval on a median | Firth logistic regression for a rare or small binary outcome | Cohen's d with a bootstrap interval | Citation

Last update: 2026-09-22
Started: 2026-08-02

Text and open-ended response analysis
What this vignette covers | A survey with an open-ended item beside a Likert scale | Simulated responses | Cleaning a text item | Term and n-gram frequency | The group role: comparing branches | Keyword in context | Co-occurrence | Co-occurrence network | Sentiment | Document-feature matrix | Topic modelling and representative quotes | The rendered report | What surveyframe does not do here

Last update: 2026-09-22
Started: 2026-08-17

Multi-criteria decision analysis
What this vignette covers | Where the numbers come from | Criterion weights from pairwise judgements | Ranking suppliers on audited figures | Ranking suppliers on collected ratings | A trap worth naming | How much do the weights matter? | Which criteria drive the others | Reporting the whole plan | What surveyframe does not do here | How each method was checked

Last update: 2026-09-19
Started: 2026-08-02

Scale reliability and validity
Reliability from the instrument | Item diagnostics | EFA readiness | Convergent validity from the published loadings | Discriminant validity | Collinearity | Cautious interpretation

Last update: 2026-09-19
Started: 2026-05-14

EFA, CFA, CB-SEM, and PLS-SEM syntax generation
EFA planning syntax | CFA syntax: the lower-order measurement model | CB-SEM syntax: the structural model | PLS-SEM syntax: the two-stage higher-order model | Construct modes | Model JSON and a reporting template | Where the syntax goes next

Last update: 2026-08-22
Started: 2026-05-14

Readme and manuals

Help Manual

Help pageTopics
surveyframe: Survey Instrument Workflows for Rsurveyframe-package surveyframe
Add a model specification to an instrumentadd_model
Add references to an instrumentadd_references
Record a disclosed amendment to an instrumentamend_sframe
Read an instrument's amendment logamendment_log
The R code behind an analysis resultanalysis_syntax
Coerce to an instrumentas_sframe
Coerce a choice set to a data frameas.data.frame.sf_choices
Coerce an instrument to its item summaryas.data.frame.sframe
Summarise analysis-plan results as a data frameas.data.frame.sframe_analysis_results
Coerce an assumption report to a data frameas.data.frame.sframe_assumption_report
Extract the item table from a codebook reportas.data.frame.sframe_codebook
Extract the descriptives results tableas.data.frame.sframe_descriptives_report
Coerce an EFA readiness report to a data frameas.data.frame.sframe_efa_report
Extract the loading table from an EFA solutionas.data.frame.sframe_efa_solution
Coerce an item report to a data frameas.data.frame.sframe_item_report
Extract item missingness resultsas.data.frame.sframe_missing_data_report
Coerce a response-quality report to a data frameas.data.frame.sframe_quality_report
Coerce a reliability report to a data frameas.data.frame.sframe_reliability_report
Coerce a sample-size plan to a data frameas.data.frame.sframe_sample_size_plan
Extract a sensitivity-analysis results tableas.data.frame.sframe_sensitivity
Coerce validation problems to a data frameas.data.frame.sframe_validation
Extract reliability evidence from a validity reportas.data.frame.sframe_validity_report
Assumption-check reportassumption_report
Percentile bootstrap confidence interval for a statisticbootstrap_ci
Generate lavaan CFA syntax from an instrument or a declared modelcfa_lavaan_syntax
Generate lavaan CFA syntax from an instrument objectcfa_syntax
Clean open-ended text responses for analysisclean_text_responses
Generate a survey codebook from an instrument objectcodebook_report
Bootstrap confidence interval for Cohen's dcohens_d_ci
Bootstrap confidence interval for Cramer's Vcramers_v_ci
Descriptive statistics reportdescriptives_report
Prepare a survey instrument for exploratory factor analysisefa_report
Estimate an exploratory factor solutionefa_solution
Generate EFA planning syntaxefa_syntax
Bootstrap confidence interval for eta squaredeta_sq_ci
Export a survey instrument to Google Sheets collection formatexport_google_sheet
Export a self-contained static HTML surveyexport_static_survey
Extract representative quotes for each STM topicextract_quotes
Format an sf_branch object as a stringformat.sf_branch
Format an sf_check object as a stringformat.sf_check
Format an sf_choices object as a stringformat.sf_choices
Format an sf_item object as a stringformat.sf_item
Format an sf_model object as a stringformat.sf_model
Format an sf_scale object as a stringformat.sf_scale
Format an sframe instrument object as a stringformat.sframe
Generate item-level diagnosticsitem_report
Launch the surveyframe visual survey builderlaunch_builder
Launch SurveyBuilder with the bundled input-types demo preloadedlaunch_builder_demo
Launch the interactive response dashboardlaunch_dashboard
Launch the response dashboard with the bundled input-types demolaunch_dashboard_demo
Launch the SurveyStudio interfacelaunch_studio
Launch SurveyStudio with the bundled input-types demolaunch_studio_demo
Link an instrument to its current Git commitlink_git_commit
Missing-data reportmissing_data_report
Serialise a model specification to JSONmodel_json
Create a model reporting templatemodel_report_template
N-gram frequency for open-ended textngram_frequency
Flag univariate and multivariate outliersoutlier_report
Plot analysis-plan resultsplot.sframe_analysis_results
Post-hoc and pairwise comparison reportposthoc_report
Preview a demo survey in one linepreview_demo
Print an sf_branch objectprint.sf_branch
Print an sf_check objectprint.sf_check
Print an sf_choices objectprint.sf_choices
Print an sf_item objectprint.sf_item
Print an sf_model objectprint.sf_model
Print an sf_scale objectprint.sf_scale
Print an sframe instrument objectprint.sframe
Generate a data quality report for survey responsesquality_report
Read references from BibTeXread_bibtex
Read and validate survey responsesread_responses
Read an instrument from a .sframe fileread_sframe
Read survey responses from a Google Sheetread_sheet_responses
Estimate scale reliability from item responsesreliability_report
Render a reproducible survey reportrender_report
Render one analysis result as the report doesrender_result
Render analysis results to a formatted HTML reportrender_results
Render a survey from an instrument objectrender_survey
Run a pre-planned analysis from an instrument's analysis planrun_analysis_plan
Sample-size and power planning helpersample_size_plan
Score defined scales from survey responsesscore_scales
Generate lavaan CB-SEM syntaxsem_lavaan_syntax
Generate seminr PLS-SEM syntaxseminr_syntax
Test how far a decision ranking moves when the weights are perturbedsensitivity_analysis
Explore a surveyframe objectsf_accessors
Extract APA-formatted result summariessf_apa
Define a branching rulesf_branch
Get branching rulessf_branches
Define a design-time survey checksf_check
Get response-quality checkssf_checks
Get choice setssf_choice_sets
Define a reusable choice setsf_choices
A list of instrument componentssf_component_list
Declare a choice-experiment (conjoint) designsf_conjoint_design
Define a latent or composite constructsf_construct
Define a covariance between constructssf_covariance
Get rows flagged by response-quality checkssf_flagged
Get an instrument component IDsf_id
The ID and label of an instrument componentsf_identity
Define an indirect effect pathsf_indirect
Create a survey instrument objectsf_instrument
Test whether validation passedsf_is_valid
Define a survey itemsf_item
Get survey itemssf_items
Get an instrument component labelsf_label
Get survey metadatasf_meta
Columns the instrument declares that the responses left outsf_missing_columns
Create a surveyframe model specificationsf_model
Get model specificationssf_models
Recover the validated objectsf_object
Define a structural path between constructssf_path
Get the pre-declared analysis plansf_plan
Set the pre-declared analysis plansf_plan<-
Get validation problemssf_problems
Create a referencesf_reference
Read the reportable parts of an analysis or quality resultsf_report_accessors
Define a scored scalesf_scale
Get survey scalessf_scales
Read a validation diagnosticsf_validation_accessors
Aggregate individual judgement matricessframe_aggregate_judgements
Write a Quarto analysis notebook for any instrumentsframe_analysis_qmd
Coerce a surveyframe object to a data framesframe_as_data_frame
Assemble per-respondent comparison matricessframe_assemble_pairwise
Write a bibliography as CSL-JSONsframe_bibliography
Create an empty SurveyStudio builder statesframe_builder_empty_state
Convert an instrument into a SurveyStudio builder statesframe_builder_state_from_instrument
Validate a SurveyStudio draft statesframe_builder_validate_draft
Enrich a codebook's items table for displaysframe_codebook_items_display
Criterion weights collected from respondentssframe_collected_weights
Normalise the decision options of an analysis-plan blocksframe_decision_options
The DEMATEL total-relation classificationsframe_dematel_compute
Load one bundled demosframe_demo
The standard demo brandingsframe_demo_branding
Load bundled surveyframe demo datasframe_demo_data
Copy a demo's Quarto notebook so you can run and change itsframe_demo_qmd
List the bundled demossframe_demos
Write responses to SPSS or Stata with the labels attachedsframe_export_labelled
Load the input-types demo backing SurveyBuilder and SurveyStudiosframe_input_types_demo_data
Group a scale's Likert items for a combined diverging chartsframe_likert_scale_groups
Term co-occurrence heatmapsframe_plot_cooccurrence
Term co-occurrence network plotsframe_plot_cooccurrence_network
Correlation matrix heatmapsframe_plot_correlation_matrix
Ranked-score bar chart for a decision-family resultsframe_plot_decision_ranking
Prominence-relation scatter for a DEMATEL resultsframe_plot_dematel_influence
Distribution shape by variable, standardisedsframe_plot_descriptives
Loadings heatmap from a fitted EFA solutionsframe_plot_efa_loadings
Scree plot from an EFA readiness reportsframe_plot_efa_scree
Group-comparison boxplotsframe_plot_group_comparison
Grouped diverging chart for a Likert matrix questionsframe_plot_likert_matrix
Grouped diverging chart for a scale's Likert itemssframe_plot_likert_scale
Missing-data report plot: missingness rate by itemsframe_plot_missingness
N-gram-frequency plot: horizontal barsframe_plot_ngram_frequency
Paired-comparison slope plotsframe_plot_paired_comparison
Quality report plot: straight-lining flag rate by scalesframe_plot_quality
Regression diagnostic plots for a regression_linear resultsframe_plot_regression_diagnostics
Reliability plot: alpha and omega by scalesframe_plot_reliability
Sentiment plot: diverging bar, or a positive/negative comparison cloudsframe_plot_sentiment
Term-frequency plot: horizontal bar or word cloudsframe_plot_term_frequency
Topic-model top-terms plot: faceted bars, one facet per topicsframe_plot_topics
Validity report plot: composite reliability and AVE by constructsframe_plot_validity
Raw-variable distribution panels: histogram, boxplot, and Q-Qsframe_plot_variable_distribution
Choosing a plotsframe_plots
Build a performance matrix from rated matrix itemssframe_rated_matrix
List an instrument's referencessframe_references
Choosing a reportsframe_reports
The second table a result carries, if it has onesframe_result_supplement
Save the charts from an analysis plan as filessframe_save_figures
Subset a surveyframe reportsframe_subset
Report on a validation resultsframe_validation
Summarise an sf_branch objectsummary.sf_branch
Summarise an sf_check objectsummary.sf_check
Summarise an sf_choices objectsummary.sf_choices
Summarise an sf_item objectsummary.sf_item
Summarise an sf_model objectsummary.sf_model
Summarise an sf_scale objectsummary.sf_scale
Summarise an sframe instrument objectsummary.sframe
Shiny module server for an embedded surveysurvey_module_server
Shiny module UI for an embedded surveysurvey_module_ui
Keyword-in-context concordance for open-ended textterm_context
Term frequency for open-ended textterm_frequency
surveyframe brand theme for ggplot2theme_surveyframe
Validate a surveyframe model specificationvalidate_model
Validate an instrument objectvalidate_sframe
Validity report for construct modelsvalidity_report
Write an instrument to a .sframe filewrite_sframe