| range_sortna | R Documentation |
In one pass over the vector NAs are treated according to parameter
na.last exactly like sort() does, the range(),
number of NAs and unsortedness is determined.
range_sortna(x, decreasing = FALSE, na.last = NA)
x |
an integer vector |
decreasing |
(currently only |
na.last |
|
an integer vector with NAs are treated and an attribute range_na() with
four elements:
min integer
max integer
number of NAs
0 for sorted vector and 1 for is.unsorted()
range_na() and range_nanozero()
range_sortna(c(0L, 1L, NA, 2L))
range_sortna(c(2L, NA, 1L, 0L))
range_sortna(c(0L, 1L, NA, 2L), na.last=TRUE)
range_sortna(c(2L, NA, 1L, 0L), na.last=TRUE)
range_sortna(c(0L, 1L, NA, 2L), na.last=FALSE)
range_sortna(c(2L, NA, 1L, 0L), na.last=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.