View source: R/50-ordered_sequence-ops.R
| pop_all_key | R Documentation |
Removes and returns all elements whose key equals key.
pop_all_key(x, key)
x |
An |
key |
Query key. |
Use as.list() to convert elements to a standard R list.
A list with fields:
elements: ordered_sequence of removed matches.
remaining: ordered_sequence after removal.
x <- ordered_sequence("a", "b", "c", keys = c(1, 2, 2))
out <- pop_all_key(x, 2)
as.list(out$elements)
out$remaining
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.