Skip to contents

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 R object.

...

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)
#> {"a", (1L 2L 3L), <<data.frame(150x5)>>}
delete(s, 1:3, "a")
#> {<<data.frame(150x5)>>}
delete(s, iris)
#> {"a", (1L 2L 3L)}
try({
delete(s, "b")  # "b" is not in Set
})
#> Error : "b" is not in Set