Description Usage Arguments Details Value See Also Examples
View source: R/peek_back.rdeque.R
Simply returns the data element sitting at the back of the rdeque, leaving the rdeque alone.
1 2 |
d |
rdeque to peek at. |
... |
additional arguments to be passed to or from methods (ignored). |
Runs in O(1)
worst-case time.
data element existing at the back of the rdeque.
without_back
for removing the front element.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | d <- rdeque()
d <- insert_front(d, "a")
d <- insert_front(d, "b")
e <- peek_back(d)
print(e)
print(d)
## Assigning to the front data element with peek_front:
d <- rdeque()
d <- insert_front(d, data.frame(a = 1, b = 1))
d <- insert_front(d, data.frame(a = 1, b = 1))
peek_back(d)$a <- 100
print(d)
peek_back(d) <- data.frame(a = 100, b = 100)
print(d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.