stack-class | R Documentation |
A stack implementation using a filehash
database
## S4 method for signature 'stack'
show(object)
createS(filename)
initS(filename)
## S4 method for signature 'stack'
push(db, val, ...)
mpush(db, vals, ...)
## S4 method for signature 'stack'
mpush(db, vals, ...)
## S4 method for signature 'stack'
isEmpty(db, ...)
## S4 method for signature 'stack'
top(db, ...)
## S4 method for signature 'stack'
pop(db, ...)
object |
a stack object |
filename |
name of file where stack is stored |
db |
a stack object |
val |
an R object to be added to the stack |
... |
arguments passed to other methods |
vals |
a list of R objects |
Objects can be created by calls of the form new("stack", ...)
or by calling createS
. Existing queues can be initialized with initS
.
a stack object
show(stack)
: Print a stack object.
push(stack)
: Push an object on to the stack
mpush(stack)
: Push a list of R objects on to the stack
isEmpty(stack)
: Indicate whether the stack is empty or not
top(stack)
: Return the top element of the stack
pop(stack)
: Return the top element of the stack and remove that element from the stack
createS()
: Create a filehash Stack
initS()
: Initialize and existing filehash stack
mpush()
: Push multiple R objects on to a stack
stack
Object of class "filehashDB1"
name
Object of class "character"
: the name of the stack (default is the file name in which the stack data are stored)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.