as.stack: Convert to Stack

View source: R/as.stack.r

as.stackR Documentation

Convert to Stack

Description

Convert to Stack

Usage

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

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

## End(Not run)


wrathematics/dequer documentation built on March 17, 2022, 6:38 p.m.