discard | R Documentation |
Search and remove an element from an object. If the element is not found, ignore the attempt.
discard(.x, ...)
ref_discard(.x, ...)
## S3 method for class 'Container'
discard(.x, ...)
## S3 method for class 'Container'
ref_discard(.x, ...)
.x |
any |
... |
elements to be discarded. |
For Container
, an object of class Container
(or one of the
respective derived classes).
s = setnew("a", num = 1:3, data = iris)
print(s)
discard(s, 1:3, "a")
discard(s, iris)
discard(s, "b") # ignored
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.