Description Usage Arguments Value Author(s) References See Also Examples
See generic: rmNested
1 2 3 | ## S4 method for signature 'character,missing'
rmNested(id, where = parent.frame(),
strict = c(0, 1, 2), ...)
|
id |
|
where |
|
strict |
|
... |
Further arguments to be passed to subsequent functions/methods. |
See method
rmNested-char-env-method
Janko Thyson janko.thyson@rappster.de
http://github.com/Rappster/nestr
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ## Not run:
##------------------------------------------------------------------------------
## Default `where` //
##------------------------------------------------------------------------------
setNested(id = "a", value = TRUE)
exists("a", environment(), inherits = FALSE)
rmNested(id = "a")
exists("a", environment(), inherits = FALSE)
setNested(id = "a/b/c", value = 10, gap = TRUE)
exists("c", environment()$a$b, inherits = FALSE)
rmNested(id = "a/b/c")
exists("c", environment()$a$b, inherits = FALSE)
## Clean up //
rm(a)
##------------------------------------------------------------------------------
## Different `where` //
##------------------------------------------------------------------------------
where <- new.env()
setNested(id = "a/b/c", value = 10, where = where, gap = TRUE)
rmNested(id = "a/b/c", where = where)
exists("c", where$a$b, inherits = FALSE)
## Clean up //
rm(where)
##------------------------------------------------------------------------------
## Strictness //
##------------------------------------------------------------------------------
rmNested(id = "a")
try(rmNested(id = "a", strict = 1))
try(rmNested(id = "a", strict = 2))
rmNested(id = "a/b/c")
try(rmNested(id = "a/b/c", strict = 1))
try(rmNested(id = "a/b/c", strict = 2))
rmNested(id = character()))
try(rmNested(id = character(), strict = 1))
try(rmNested(id = character(), strict = 2))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.