as.stack: Convert to Stack

Description Usage Arguments Value Examples

View source: R/as.stack.r

Description

Convert to Stack

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
as.stack(x)

## S3 method for class 'list'
as.stack(x)

## Default S3 method:
as.stack(x)

## S3 method for class 'deque'
as.stack(x)

## S3 method for class 'queue'
as.stack(x)

Arguments

x

An object either to be converted to the first element of a stack (default), or the elements of a list (or columns of a dataframe) to be set as elements of a stack.

Value

A stack object.

Examples

1
2
3
4
5
6
## Not run: 
library(dequer)
s <- as.stack(lapply(1:5, identity))
s

## End(Not run)

dequer documentation built on May 1, 2019, 11:30 p.m.