Skip to content

Check if the Series is sorted

Source code

Description

Check if the Series is sorted

Usage

<Series>$is_sorted(descending = FALSE)

Arguments

descending Check if the Series is sorted in descending order.

Value

A logical value

See Also

Use $set_sorted() to add a "sorted" flag to the Series that could be used for faster operations later on.

Examples

library(polars)

as_polars_series(1:4)$sort()$is_sorted()
#> [1] TRUE