min_key: Minimum Key Value

View source: R/50-ordered_sequence-ops.R

min_keyR Documentation

Minimum Key Value

Description

Returns the smallest key currently present in the ordered sequence.

Usage

min_key(x)

Arguments

x

An ordered_sequence.

Details

This follows sequence key order directly. Equivalent to key_at(x, 1).

Value

Minimum key, or NULL when x is empty.

See Also

max_key(), key_at(), nearest_key()

Examples

x <- ordered_sequence("a", "b", keys = c(2, 1))
min_key(x)
min_key(ordered_sequence())

Immutables documentation built on Sept. 26, 2026, 1:07 a.m.