page_choose_one_option {occupationMeasurement} | R Documentation |
Show a page with multiple radio button options where once can be picked.
Description
Show a page with multiple radio button options where once can be picked.
Usage
page_choose_one_option(
page_id,
question_text = "Please pick one of the following options",
list_of_choices = list(One = 1, Two = 2, Three = 3),
choice_labels = NULL,
next_button = TRUE,
previous_button = TRUE,
run_before = NULL,
run_after = NULL,
...
)
Arguments
page_id |
A unique string identifiying this page. Used to store data. |
question_text |
The question / text to display. This can be either a string, which will simply be displayed or a function to dynamically determine the question_text. |
list_of_choices |
A list of answering options.
This can either be just a simple list of values or a named list with the
names corresponding to what the user sees and the values corresponding to
the actually saved values.
e.g. with |
choice_labels |
List or vector of only the choice names to be shown. This has to be matched by an equal-length vector in list_of_choices. |
next_button |
Whether to show the button to navigate to the next page? Defaults to TRUE. |
previous_button |
Whether to show the button to navigate to the preivous page? Defaults to TRUE. |
run_before |
Similar to |
run_after |
Similar to |
... |
Other parametrs are passed on to |
Value
A page object.
See Also
Examples
## Not run:
one_page_questionnaire <- list(
page_choose_one_option(
"test_page_radio",
question_text = "Hello there! Please pick your favorite number from the options below:",
list_of_choices = list(One = 1, Two = 2, Three = 3)
),
page_final()
)
if (interactive()) {
app(questionnaire = one_page_questionnaire)
}
## End(Not run)