Description Usage Arguments Details Value Future Examples
This function issues a question onto the screen
and get the answer from the user keyboard. The answer can be checked among
a set of possibilities.
The basic principle is to provide some restrictions and checks on the answers.
If an answer is not complete (because more components are asked) the user must
follow to type it. If an answer is not accepted, it is repeated a limited
number of times before a fatal error is issued. Also some help can be
provided in case the user asks for it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
question |
The question to issue on the screen before getting the answer. |
q7help |
Answer providing the display of the helping complement to the question if any (then cannot be a possible answer returned by the function). |
help |
Additional information provided to the user if requested with q7help. |
q7stop |
Answer to give to stop the inquiry and a NULL is returned (then cannot be a acceptable answer). |
a7type |
indicates the type of the answer: either "integer", "numeric" or "character", when not "character" a vector can be returned with blank as separator. |
a7default |
Default value when no answer is issued; must be numeric if a7type is not character. Must be NULL if no default value. |
a7length |
number of returned values; either a unique number or the minimum and maximum numbers of items. For character answers, the separator between paragraphs is a7separator; for numerical values it is the blank(s). To include several blanks within character strings, you must use quoting marks (\"). |
a7separator |
character string indicating a separation between paragraphes for character answers. |
a7possibility |
Answer providing the display of the accepted possibilities. (when they are constrained, then cannot be a right answer). |
a7possibilities |
When the type is "character" a character vector containing the different possibilities, or a named character, the names are the possibilities and the values are the explanations of each possibility. When the type is not "character" a numerical vector of size 2 providing the minimum and maximum for accepted values. NULL for no check on the possibilities. |
patience |
number of accepted bad answers before a fatal stop. |
format |
0: no help and reduced display; 1: reduced display; 2: enlarged display. |
Answers q7help or a7possibility are not possible (only when these options are activated, that is help and a7possibilities are not NULL.
The answer, or NULL if (i) the answer was void or (ii) no accepted answer was provided by the user. The answer can be a vector, if so and if constrained are imposed for accepted values, then the acceptance is checked for every component of the vector.
Add the possibility to answer with intervals for numerical answers.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.