mvl_order_vectors: Return permutation sorting vector entries

View source: R/RMVL.R

mvl_order_vectorsR Documentation

Return permutation sorting vector entries

Description

This function is similar to R order() function, but operates on MVL_OBJECTS.

Usage

mvl_order_vectors(
  L,
  indices = NULL,
  decreasing = FALSE,
  sort_function = ifelse(decreasing, 2, 1)
)

Arguments

L

list of vector like MVL_OBJECTs

indices

list of indices into objects to sort. If absent or NULL it is assumed to be from 1 to length of the object.

decreasing

whether to sort in ascending or decreasing order. This parameter is provided for compatibility with order() function

sort_function

specifies desired sort order

Value

sorted indices

See Also

mvl_hash_vectors, mvl_find_matches, mvl_group, mvl_find_matches, mvl_indexed_copy, mvl_merge

Examples

## Not run: 
Mtmp<-mvl_open("tmp_a.mvl", append=TRUE, create=TRUE)
mvl_write_object(Mtmp, runif(100), "vec1")
Mtmp<-mvl_remap(Mtmp)
permutation1<-mvl_order_vectors(list(Mtmp["vec1", ref=TRUE]))

## End(Not run)

RMVL documentation built on Nov. 2, 2023, 6:09 p.m.

Related to mvl_order_vectors in RMVL...