View source: R/50-ordered_sequence-ops.R
| pop_key | R Documentation |
Removes and returns the first element whose key equals key.
pop_key(x, key)
x |
An |
key |
Query key. |
For duplicate keys, the first element in stable sequence order is removed.
A list with fields:
value: removed element, or NULL on miss.
key: removed key, or NULL on miss.
remaining: ordered sequence after removal.
x <- ordered_sequence("a", "b", "c", keys = c(1, 2, 2))
out <- pop_key(x, 2)
out$value
out$remaining
pop_key(x, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.