Convert to Queue

Description

Convert to Queue

Usage

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

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

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

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

## S3 method for class '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

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

## End(Not run)