Learn R Programming

multiplyr (version 0.1.1)

bm_mpermute: Extension of bigmemory::mpermute to allow decreasing parameter to be a vector

Description

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

Usage

bm_mpermute(x, order = NULL, cols = NULL, allow.duplicates = FALSE, decreasing = FALSE, ...)

Arguments

x
bigmemmory::big.matrix
order
Ordering vector
cols
Columns to sort on
allow.duplicates
If TRUE allows row to be duplicated in result (order will be non-permutation of 1:nrow(x))
decreasing
Sort in decreasing order: single value or equal to length of x for tie breaking
...
Additional parameters to pass to bm_morder

Value

No return value: permutes in place

Examples

Run this code

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

Run the code above in your browser using DataLab