mvl_order_vectors {RMVL}R 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)

[Package RMVL version 1.1.0.0 Index]