as.rpqueue: Create a pre-filled rpqueue from a given input

Description Usage Arguments Details Value See Also Examples

Description

Creates a new rpqueue from a given input. Coerces input to a list first using as.list, the element at x[[1]] becomes the front of the new queue.

Usage

1

Arguments

x

input to convert to an rpqueue.

...

additional arguments to be passed to or from methods (ignored).

Details

Runs in O(N) in the size of the input. Because data.frames return a list of columns when run through as.list, running as.rpqueue results in a queue of columns, rather than a queue of rows.

Value

a new rpqueue.

See Also

rpqueue.

Examples

1
2
3
4
5
6
d <- as.rpqueue(1:20)
print(d)

## A queue with only 5 elements, one for each column
oops <- as.rdeque(iris)
print(oops)


Search within the rstackdeque package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.