queue | R Documentation |
queue
creates a queue.
queue(items = NULL)
items |
a list of items |
Following methods are exposed:
.$push(item) .$pop() .$peek() .$clear() .$size() .$as_list() .$print()
item
: any R object
stack and deque
q <- queue()
q$push("first")
q$push("second")
q$pop() # first
q$pop() # second
q <- queue(list("foo", "bar"))
q$push("baz")$push("bla")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.