mvl_indexed_copy | R Documentation |
This function creates new MVL vectors and data frames by copying only rows or values specified by given indices. The vector indices can be an R integer or numeric vector, a logical vector of the size matching to the object being copied, or a suitable vector stored in MVL file.
mvl_indexed_copy(MVLHANDLE, x, indices, name = NULL, only.columns = NULL)
MVLHANDLE |
a handle to MVL file produced by mvl_open() |
x |
a vector-like MVL_OBJECT or a data.frame stored in MVL file |
indices |
a vector of indices into x |
name |
if specified add a named entry to MVL file directory |
only.columns |
if x is MVL_OBJECT with class data.frame copy only columns specified in this character or integer vector |
an object of class MVL_OFFSET that describes an offset into this MVL file. MVL offsets are vectors and can be concatenated. They can be written to MVL file directly, or as part of another object such as list.
mvl_hash_vectors
, mvl_find_matches
, mvl_group
, mvl_find_matches
, mvl_order_vectors
, mvl_merge
, mvl_write_object
, mvl_fused_write_objects
## 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]))
mvl_indexed_copy(Mtmp, Mtmp["vec1", ref=TRUE], permutation1, name="vec1_sorted")
Mtmp<-mvl_remap(Mtmp)
print(Mtmp$vec1_sorted)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.