R: A little stack.

peek {arrayhelpers} | R Documentation

## A little stack.

### Description

TODO: implement as reference class? Note: `pop` only removes elements. To retrieve them, use `peek`.

### Usage

    peek(x, an, n = 1L)

    pop(x, an, n = 1L)

    push (x, an) <- value

### Arguments

`x` | the object
`an` | attribute holding the stack
`n` | numer of element to peek at and numer of elements to pop (delete), respectively
`value` | list of things to push on the stack.

### Value

`push` and `pop`: the object with stack in list `an` pushed/popped by the `n` elements

`peek`: the `n`th stack element (without popping!)

### Author(s)

Claudia Beleites

[Package arrayhelpers version 1.0-20160527 Index]