Description Usage Arguments Examples
View source: R/run_scenarios.R
Run different scenarios on the survey data based on the model output from
model_survey()
1 2 | run_scenarios(model, scenarios = make_scenarios(model),
variables_column = FALSE, descending = TRUE)
|
model |
Model object from |
scenarios |
A data frame of scenarios |
variables_column |
Should the table output have a variables column |
descending |
Should the table be in descending order by expected_NPS (scenarios will be renumbered) |
1 2 3 4 5 6 7 8 9 10 11 12 | library(NPS)
library(NPSdrivers)
library(dplyr)
data(survey_sim)
survey_sim <- survey_sim %>%
mutate(NPC = factor(npc(recommend), ordered = TRUE)) %>%
select(-recommend)
m <- model_survey(survey_sim)
scenario_results <- run_scenarios(m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.