rm_bytag | R Documentation |
Remove all objects in the current environment that have a specified tag.
rm_bytag(
tag,
envir = parent.frame(),
confirm = getOption("tagsr.confirm", FALSE)
)
tag |
The tag to search for. |
envir |
The environment to search in. Defaults to the current environment. |
confirm |
If |
No return value.
add_tags
, has_tag
, ls_bytag
# create some objects with tags
x <- 1:10
y <- matrix(rnorm(16), 4, 4)
add_tags(x, "numbers")
add_tags(y, "matrix")
# remove all objects with the "numbers" tag
rm_bytag("numbers")
# remove all objects with the "matrix" tag without confirmation prompt
set_confirm(FALSE)
rm_bytag("matrix")
# confirm that objects have been removed
ls()
# clean up
rm(set_confirm, x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.