Description Usage Arguments Value
Prompts the user to choose one of the given set of choices
1 2 | GetUserChoice(choices, choosing.what = "one of the following", default = 1,
allow.range = FALSE, optional = FALSE, numbers = NULL)
|
choices |
vector of strings |
choosing.what |
string; used for presenting the instructions to the user |
default |
int if the user just hits enter, this will be chosen |
allow.range |
boolean if TRUE, the user can enter something like 2-4 which will return c(2,3,4) |
optional |
boolean if TRUE, user can select 0 to return false (i.e. no choice) |
numbering |
a vector of ints to use as the choice labels, instead of just numbering them starting at 1. optional |
int the index of the choice selected by the user
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.