Description Usage Arguments Details Value
Stack is an abstract data type which allows for pushing elements and popping them in reverse (last in-first out) order.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
stack |
a stack object |
obj |
an R object |
... |
other arguments passed to or from other methods |
stack_create creates a new stack.
as.list.Stack converts a given stack object to an R list.
stack_empty determines if a given stack is empty or not.
stack_push pushes a given object to the top of the stack.
stack_pop pops an object from the top of the stack.
print.Stack prints the contents of the stack
(coerced to a list object) on the console.
format.Stack pretty-prints the contents of the stack
(coerced to a list object) on the console.
str.Stack compactly displays the contents of the stack
(coerced to a list object) on the console.
stack_create returns a new, empty stack.
as.list.Stack returns an R list object.
stack_empty returns a single logical value.
stack_push does not return anything interesting.
stack_pop returns an object at the top of te stack or
throws an error if the stack is empty.
print.Stack returns the stack coerced to a list, invisibly.
format.Stack returns the character representation
of the objects in the stack.
str.Stack does not return anything interesting.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.