View source: R/analysis_plan.R
| run_analysis_plan | R Documentation |
Executes every analysis block defined in the instrument's analysis_plan
slot against the supplied response data. Each block corresponds to one
research question defined during instrument design in the SurveyBuilder.
Results include APA-formatted statistics, effect sizes, interpretation
prompts, and reporting references.
run_analysis_plan(
data,
instrument,
scored = TRUE,
plots = FALSE,
plot_palette = c("web", "print")
)
data |
A |
instrument |
An |
scored |
Logical. Whether to automatically score scales before running
the analysis. Defaults to |
plots |
Logical. When |
plot_palette |
One of |
An object of class sframe_analysis_results, a list with one
element per analysis block. Each element contains the test result,
APA string, interpretation prompt, and reporting-reference metadata.
Inferential blocks also carry a $table data frame suitable for
knitr::kable(). Pass to render_results() to generate a formatted
report.
render_results(), read_sheet_responses()
instr <- read_sframe(
system.file("extdata", "tourism_services_demo.sframe",
package = "surveyframe")
)
responses <- read_responses(
system.file("extdata", "tourism_services_responses.csv",
package = "surveyframe"),
instr,
respondent_id = "respondent_id",
submitted_at = "submitted_at",
meta_cols = "started_at"
)
results <- run_analysis_plan(responses, instr)
print(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.