Learn R Programming

rstackdeque (version 1.1.1)

as.rpqueue.default: Default method for converting to an rpqueue

Description

Default method for converting to an rpqueue.

Usage

"as.rpqueue"(x, ...)

Arguments

x
the input to convert to an rpqueue.
...
arguments to be passed to or from other methods (ignored).

Value

a filled rpqueue.

Details

Elements from the input (of any type) are first converted to a list with as.list, after this an rpqueue of the appropriate size is created holding the elements. The element at x[[1]] becomes the front of the rpqueue. Runs in time $O(n)$.

See Also

rpqueue for info about rpqueues, as.rpqueue for the generic function.