This is the primary and most convenient way of configuring the app.
create_app_settings(
save_to_file,
suggestion_type = "auxco-1.2.x",
default_num_suggestions = 5,
require_respondent_id = FALSE,
warn_before_leaving = FALSE,
skip_followup_types = c(),
response_output_dir = file.path("output", "responses"),
handle_data = NULL,
get_job_suggestion_params = NULL,
display_page_ids = TRUE,
default_tense = "present",
default_extra_instructions = "on",
verbose = TRUE,
.validate = TRUE
)
A list of app_settings.
Should responses be saved as files in response_output_dir? Defaults to use the SAVE_TO_FILE environment variable. We recommend setting this to TRUE.
Which type of suggestion to use / provide. Possible options are "auxco-1.2.x" and "kldb-2010".
The number of suggestions to generate and display to users. Accepts all positive integers. Defaults to 5.
Are respondent_ids required? Defaults to FALSE
Should users be warned that their progress will be lost upon leaving the site? Defaults to FALSE.
A vector of strings corresponding to the question_type of followup_question that should be skipped. Allowed ` values: c("anforderungsniveau", "aufsicht", "spezialisierung", "sonstige")
Path to the directory in which to store data
from the app. Defaults to ./output/responses/
.
Callback function to handle data from the app. This setting takes a function that get's passed 3 parameters: table_name (A reference name indicating which data to save), data (A dataframe of data to save), session (the user's current session).
List of parameters to pass to
get_job_suggestion. Refer to get_job_suggestions()
for a list of
supported parameters. Note that the parameter aggregate_score_threshold
needs to be set on page_first_freetext()
or page_second_freetext()
.
Whether page_ids
should be displayed within the
questionnaires.
We may not always want to ask for the current occupation, but maybe also for the previous occupation in case of pensioners etc. with a value of "past". Possible values are "present" (default), "past". This setting can be overwritten on a session-by-session basis with the URL-Query parameter "tense".
Display additional instructions for e.g. an interviewer conducting an interview. Possible values are "on" (default), "off". This setting can be overwritten on a session-by-session basis with the URL-Query parameter "extra_instructions".
Should additional output be printed when running? Defaults to TRUE.
Whether the created app_settings should be validated. Defaults to TRUE.
data.table::setDTthreads(1)
app_settings <- create_app_settings(
# Important to save results from the app
save_to_file = TRUE,
require_respondent_id = TRUE
)
Run the code above in your browser using DataLab