sort: Sort elements

sortR Documentation

Sort elements

Description

Sorts the elements in a container by reference.

Usage

sort(x, decreasing, ...)

Arguments

x

A CppForwardList or CppList object.

decreasing

Ignored.

...

Ignored.

Details

decreasing and ... are only included for compatibility with the generic base::sort method and have no effect.

Value

Invisibly returns NULL.

See Also

sorting, unique.

Examples

l <- cpp_forward_list(c(3, 2, 4))
l
# 3 2 4

sort(l)
l
# 2 3 4


cppcontainers documentation built on Sept. 9, 2025, 5:55 p.m.