Containers-package {Containers}R Documentation

Containers

Description

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.

Details

Package: Containers
Type: Package
Version: 1.0
Date: 2008-1-10
License: GPL

Author(s)

John Hughes

Maintainer: John Hughes <jph264@psu.edu>

Examples

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())

[Package Containers version 1.2 Index]