peek_back-set: Assign to/modify the back of an rdeque

Description Usage Arguments Details Value See Also Examples

Description

Allows modification access to the back of a deque.

Usage

1
peek_back(d, ...) <- value

Arguments

d

rdeque to modify the back element of.

...

additional arguments to be passed to or from methods.

value

value to assign to the back data element.

Details

Runs in O(1) worst case time. Throws an error if the deque is empty.

Value

modified rdeque.

See Also

peek_back.rdeque for accessing the back element.

Examples

1
2
3
4
5
6
7
8
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)

rstackdeque documentation built on May 19, 2017, 3:07 p.m.

Search within the rstackdeque package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.