View source: R/30-api-flexseq-ends.R
| push_back | R Documentation |
Returns a new sequence with value appended at the right end.
push_back(x, value)
x |
A |
value |
Element to append. |
This operation is persistent: x is not modified.
Elements can be named, but only if all are uniquely named (no missing names).
Updated flexseq.
s <- as_flexseq(letters[1:3])
s2 <- push_back(s, "d")
s2
s # unchanged
n <- as_flexseq(list(two = 2, three = 3))
new_el <- 4
names(new_el) <- "four"
push_back(n, new_el)
# Named/unnamed mixes are rejected
try(push_back(n, 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.