discard_at | R Documentation |
Search and remove values at given indices, which can be numeric or character or both. Invalid indices are ignored.
discard_at(.x, ...) ref_discard_at(.x, ...) ## S3 method for class 'Container' discard_at(.x, ...) ## S3 method for class 'Container' ref_discard_at(.x, ...) ## S3 method for class 'dict.table' discard_at(.x, ...) ## S3 method for class 'dict.table' ref_discard_at(.x, ...)
.x |
any |
... |
indices at which values are to be discarded. |
For Container
, an object of class Container
(or one of the
respective derived classes).
For dict.table
, an object of class dict.table
.
co = container(a = 1, b = 2, 3) discard_at(co, "a", "b") # [3] discard_at(co, 1:2) # [3] discard_at(co, "a", 3) # [b = 2] discard_at(co, "x") # ignored dit = as.dict.table(head(sleep)) discard_at(dit, "ID") discard_at(dit, "ID", 1) discard_at(dit, "foo") # ignored
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.