Learn R Programming

bit64 (version 4.8.4)

sort.integer64: High-level intger64 methods for sorting and ordering

Description

Fast high-level methods for sorting and ordering. These are wrappers to ramsort.integer64() and friends and do not modify their arguments.

Usage

# S3 method for integer64
sort(
  x,
  decreasing = FALSE,
  has.na = TRUE,
  na.last = TRUE,
  stable = TRUE,
  optimize = c("time", "memory"),
  VERBOSE = FALSE,
  ...
)

# S3 method for integer64 order( ..., na.last = TRUE, decreasing = FALSE, has.na = TRUE, stable = TRUE, optimize = c("time", "memory"), VERBOSE = FALSE )

Arguments

Value

sort returns the sorted vector and vector returns the order positions.

Details

see sort() and order()

See Also

sort(), sortcache()

Examples

Run this code
  x <- as.integer64(sample(c(rep(NA, 9), 1:9), 32, TRUE))
  x
  sort(x)
  message(
    "the following has default optimize='time' which is faster ",
    "but requires more RAM, this calls 'ramorder'"
  )
  order(x)
  message("slower with less RAM, this calls 'ramsortorder'")
  order(x, optimize="memory")

Run the code above in your browser using DataLab