Containers-package {Containers} | R Documentation |
This package furnishes R with a suite of object-oriented data structures: stack, queue, deque, max-heap, min-heap, binary search tree, splay tree. Each R class is backed by a Java class.
Package: | Containers |
Type: | Package |
Version: | 1.0 |
Date: | 2008-1-10 |
License: | GPL |
John Hughes
Maintainer: John Hughes <jph264@psu.edu>
aStack = Stack() # Instanciate a stack. aStack$push(3) # Push a few integers onto the stack. aStack$push(2) aStack$push(1) aStack$top() # Inspect the top element. while (! aStack$isEmpty()) # Print the elements, emptying the stack in the process. print(aStack$pop())