bit_sort(c(2L,1L,NA,NA,1L,2L))
bit_sort(c(2L,1L,NA,NA,1L,2L), na.last=FALSE)
bit_sort(c(2L,1L,NA,NA,1L,2L), na.last=TRUE)
if (FALSE) {
x <- sample(1e7, replace=TRUE)
system.time(bit_sort(x))
system.time(sort(x))
}
Run the code above in your browser using DataLab