Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

quicksort3

Low-level sorting: threeway quicksort


Description

In one pass over the vector NAs are handled according to parameter na.last by range_sortna, then, if the vector is unsorted, threeway quicksort is invoked.

Usage

quicksort3(x, na.last = NA)

Arguments

x

an integer vector

na.last

NA removes NAs, FALSE puts NAs at the beginning, TRUE puts NAs at the end

Value

a sorted vector

Examples

countsort(c(2L,0L,1L,NA,2L))
countsort(c(2L,0L,1L,NA,2L), na.last=TRUE)
countsort(c(2L,0L,1L,NA,2L), na.last=FALSE)

bit

Classes and Methods for Fast Memory-Efficient Boolean Selections

v4.0.4
GPL-2 | GPL-3
Authors
Jens Oehlschlägel [aut, cre], Brian Ripley [ctb]
Initial release
2020-08-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.