Description Usage Arguments Details Value See Also Examples
View source: R/as.list.rdeque.R
Converts an rdeque to a list, where the front of the deque becomes the first element of the list, the second-from-front the second, and so on.
1 2 |
x |
rdeque to convert. |
... |
additional arguments passed to as.list after initial conversion to list. |
Runs in O(N) time in the size of the rdeque, but the generated list is pre-allocated for efficiency.
a list containing the elements of the rdeqeue in front-to-back order.
as.data.frame.rstack
and the generic as.list
.
1 2 3 4 5 6 | d <- rdeque()
d <- insert_front(d, "a")
d <- insert_front(d, "b")
dlist <- as.list(d)
print(dlist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.