delete {container} | R Documentation |
Delete Container Elements Safely
Description
Search and remove elements from an object. If the element is not found, an error is signaled.
Usage
delete(.x, ...)
ref_delete(.x, ...)
## S3 method for class 'Container'
delete(.x, ...)
## S3 method for class 'Container'
ref_delete(.x, ...)
Arguments
.x |
any |
... |
elements to be deleted. |
Value
For Container
, an object of class Container
(or one of the
respective derived classes).
Examples
s = setnew("a", 1:3, iris)
print(s)
delete(s, 1:3, "a")
delete(s, iris)
try({
delete(s, "b") # "b" is not in Set
})
[Package container version 1.0.4 Index]