mvl_write_spatial_index1 | R Documentation |
This function is passed a list of MVL vectors which are interpreted in data.frame fashion. These rows are split into groups so that identical rows are guaranteed to belong to the same group. This is done using partition into equal sized bins. This function is meant for constructing spatial indexes.
mvl_write_spatial_index1(MVLHANDLE, L, bits, name = NULL)
MVLHANDLE |
a handle to MVL file produced by mvl_open() |
L |
list of vector like MVL_OBJECTs |
bits |
a vector of bit values to use for each member of L |
name |
if specified add a named entry to MVL file directory |
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_order_vectors
, mvl_find_matches
, mvl_group
, mvl_find_matches
, mvl_indexed_copy
, mvl_merge
, mvl_hash_vectors
, mvl_get_groups
## Not run:
Mtmp<-mvl_open("tmp_a.mvl", append=TRUE, create=TRUE)
mvl_write_object(Mtmp, data.frame(x=runif(100), y=1:100), "df1")
Mtmp<-mvl_remap(Mtmp)
mvl_write_spatial_index1(Mtmp, list(Mtmp$df1[,"x",ref=TRUE], Mtmp$df1[,"y", ref=TRUE]),
c(2, 3), "df1_sp_groups")
Mtmp<-mvl_remap(Mtmp)
print(mvl_get_neighbors(Mtmp["df1_sp_groups", ref=TRUE], list(c(0.5, 0.6), c(2, 3))))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.