data.table::setDTthreads(1)
if (FALSE) {
# Set up a "fake" shiny session to store data
session <- shiny::MockShinySession$new()
session$userData <- list(
current_page_id = "other_page",
questionnaire_data = list(
example_page = list()
)
)
# This code is expected to be run in e.g. run_before or run_after
# It doesn't really make sense to run this code outside
set_item_data(
session = session,
page_id = "example_page",
question_text = "How are you?"
)
set_item_data(
session = session,
page_id = "example_page",
response_id = 3,
response_text = "I'm doing great! (response_id = 3)"
)
}
Run the code above in your browser using DataLab