Description Usage Arguments Details Value See Also Examples
Allows modification access to the front of a deque.
1 2 | ## S3 replacement method for class 'rdeque'
peek_front(x, ...) <- value
|
x |
rdeque to modify the front element of. |
... |
additional arguments to be passed to or from methods (ignored). |
value |
value to assign to the front data element. |
Runs in O(1) worst case time. Throws an error if the rdeque is empty
. Modifies the element in place (i.e., is not side-effect-free).
modified rdeque.
peek_front.rdeque
for accessing the front data element.
1 2 3 4 5 6 7 8 9 | d <- rdeque()
d <- insert_front(d, data.frame(a = 1, b = 1))
d <- insert_front(d, data.frame(a = 1, b = 1))
peek_front(d)$a <- 100
print(d)
peek_front(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.