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