Returns a list containing the fields of a wrapper object
Value
A list with the following entries:
contents
: Any R object. The underlying object being wrappedhas_na
: Logical scalar.TRUE
ifcontents
might containNA
, orFALSE
if it definitely doesn't.is_sorted
: Logical scalar.TRUE
ifcontents
is sorted in any orderdescending
: Logical scalar.TRUE
ifcontents
is sorted in descending order,FALSE
if it is sorted in ascending order, orNA
if it isn't sorted or its sorting status is unknown.na_first
Logical scalar.TRUE
ifcontents
is sorted in an order that putsNA
values first,FALSE
if it is sorted last, orNA
ifcontents
is unsorted or its sorting status is unknown
Examples
sort(5:1) |> wrapper_details()
#> $contents
#> [1] 1 2 3 4 5
#>
#> $has_na
#> [1] FALSE
#>
#> $is_sorted
#> [1] TRUE
#>
#> $descending
#> [1] FALSE
#>
#> $na_first
#> [1] FALSE
#>