Learn R Programming

dequer (version 2.0-2)

as.deque: Convert to Deque

Description

Convert to Deque

Usage

as.deque(x)

# S3 method for list as.deque(x)

# S3 method for default as.deque(x)

# S3 method for queue as.deque(x)

# S3 method for stack as.deque(x)

Arguments

x

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

Value

A queue, stack, or deque.

Examples

Run this code
# NOT RUN {
library(dequer)
d <- as.deque(lapply(1:5, identity))
d
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab