Description Usage Arguments Value Author(s) Examples
Session variables are typically only set once per R session. They include items such as user login and password for motus.org They are implemented as active bindings in an environment. If the binding's current value is NULL, the user is prompted to enter the value.
1 2 |
name |
name of variable |
info |
human-readable description of the variable. This is used to prompt the user if the value of the variable is not already known. Alternatively, this can be an R function to be called the first time the value needs to be obtained. That function will presumably depend on other session variables. The function should return the value of the variable (or generate an error if not successful). |
env |
environment in which to create the session variable Default: Motus |
class |
the class of the variable desired; when the user is prompted for it, the value is coerced to this class. Default: "character" |
val |
initial value of the session variable. Default: unset. |
a function which can be installed as an active binding in an environment
John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm
1 2 3 4 5 | sessionVariable("userLogin", "user login at motus.org")
## This creates an active binding for the symbol "userLogin" in the environment "Motus"
## If the variable \code{Motus$userLogin} is requested in code, the user will
## be prompted to enter a value if there is no current value.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.