View source: R/30-api-flexseq-ends.R
| peek_at | R Documentation |
Returns the element at a one-based index without modifying the sequence.
peek_at(x, index)
x |
A |
index |
One-based position to read. |
Positive integer indices beyond length(x) return NULL.
Invalid indices (NA, non-integer, <= 0, or length not equal to 1) error.
Element at index, or NULL when index is out of bounds.
x <- flexseq("a", "b", "c")
peek_at(x, 2)
peek_at(x, 10)
try(peek_at(x, 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.