Learn R Programming

multiplyr (version 0.1.1)

bm_morder: Extension of bigmemory::morder to allow decreasing parameter to be a vector

Description

Extension of bigmemory::morder to allow decreasing parameter to be a vector

Usage

bm_morder(x, cols, na.last = TRUE, decreasing = FALSE)

Arguments

x
bigmemmory::big.matrix
cols
Columns to sort on
na.last
Handling of missing values: TRUE (last), FALSE (first), NA (omit)
decreasing
Sort in decreasing order: single value or equal to length of x for tie breaking

Value

Returns ordering vector

Examples

Run this code

bm <- bigmemory::big.matrix (9, 3)
bm[] <- sample(1:3, 27, replace=TRUE)
bm[]
bm_morder (bm, cols=1, decreasing=c(TRUE, FALSE))
bm_morder (bm, cols=1, decreasing=c(FALSE, TRUE))

Run the code above in your browser using DataLab