Description Usage Arguments Value See Also Examples
A function normally needs be provided value for arguments to be called. We could turn a normal function into a function with ability to be called interactively, i.e. we could call it interactively by asking user to provide value for each argument during execution.
1 | interactive_fun(fun, quiet = FALSE, debug = FALSE)
|
fun |
a function to be executed. |
quiet |
a logical of whether display interactive message. Default FALSE means display interactive message in execution. |
debug |
a logical of whether execute fun in simulation mode or real mode. Default FALSE means to execute function in real mode. |
a function which could be called in interactive mode.
Other utils_cliui:
help_fun()
,
interactive_call()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# Turn print() into interactive function and call it interactively
inter_print <- interactive_fun(print)
inter_print()
# Turn print() into interactive function and call it interactively,
# execute it without displaying information
inter_print <- interactive_fun(print, quiet = TRUE)
inter_print()
# Turn print() into interactive function and call it interactively,
# execute it in debug mode
inter_print <- interactive_fun(print, debug = TRUE)
inter_print()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.