dequer (version 2.0-1)

as.queue: Convert to Queue

Description

Convert to Queue

Usage

as.queue(x)

# S3 method for list as.queue(x)

# S3 method for default as.queue(x)

# S3 method for deque as.queue(x)

# S3 method for stack as.queue(x)

Arguments

x

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

Value

A queue object.

Examples

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

Run the code above in your browser using DataCamp Workspace