Description Usage Arguments Author(s) References See Also Examples
Retrieves the environment
that serves as an option
container from the list of R options.
1 2 3 |
id |
Signature argument. Object containing suitable information to control the actual retrieval process. In the simplest case, this corresponds to the name/ID of a package/package project. But it can also be an instance of a custom class for which a suitable methods are defined. |
hidden |
|
... |
Further arguments to be passed to subsequent functions/methods. |
Janko Thyson janko.thyson@gmail.com
http://github.com/Rappster/optionr
getOptionContainer-char-method,
ensureOptionContainer,
initializeOptionContainer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ## Not run:
##------------------------------------------------------------------------------
## Default `id` //
##------------------------------------------------------------------------------
res <- ensureOptionContainer(overwrite = TRUE)
identical(getOptionContainer(), res)
options(".optionr" = NULL)
##------------------------------------------------------------------------------
## Hidden //
##------------------------------------------------------------------------------
res <- ensureOptionContainer(hidden = FALSE, overwrite = TRUE)
identical(getOptionContainer(hidden = FALSE), res)
options("optionr" = NULL)
##------------------------------------------------------------------------------
## As interface //
##------------------------------------------------------------------------------
id <- structure(list(id = "test"), class = "OptionContext.Test")
res <- ensureOptionContainer(id, hidden = FALSE, overwrite = TRUE)
identical(getOptionContainer(id, hidden = FALSE), res)
options("test" = NULL)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.