unlist.flexseq: Coerce a Sequence to an Atomic Vector

View source: R/30-api-flexseq-core.R

unlist.flexseqR Documentation

Coerce a Sequence to an Atomic Vector

Description

Convenience wrapper around base::unlist() over as.list().

Usage

## S3 method for class 'flexseq'
unlist(x, recursive = TRUE, use.names = TRUE)

Arguments

x

A flexseq.

recursive

Passed through to base::unlist().

use.names

Passed through to base::unlist().

Details

For priority_queue, this unwraps queue entries to payload items before unlisting (equivalent to unlist(as.list(x, drop_meta = TRUE), ...)).

Inherited by ordered_sequence and interval_index through the shared class stack.

Value

An atomic vector built from as.list.flexseq().

Examples

x <- flexseq(1, 2, 3)
unlist(x)

q <- priority_queue("a", "b", priorities = c(2, 1))
unlist(q)

Immutables documentation built on April 29, 2026, 1:06 a.m.