mvl_write_object: Write R object into MVL file

View source: R/RMVL.R

mvl_write_objectR Documentation

Write R object into MVL file

Description

Write R object into MVL file

Usage

mvl_write_object(MVLHANDLE, x, name = NULL, drop.rownames = FALSE)

Arguments

MVLHANDLE

a handle to MVL file produced by mvl_open()

x

a suitable R object (vector, array, list, data.frame) or a vector-like MVL_OBJECT

name

if specified add a named entry to MVL file directory

drop.rownames

set to TRUE to prevent rownames from being written

Value

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.

See Also

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")
L<-list()
L[["x"]]<-mvl_write_object(Mtmp, 1:5)
L[["y"]]<-mvl_write_object(Mtmp, c("a", "b"))
L[["df"]]<-mvl_write_object(Mtmp, data.frame(x=1:100, z=runif(100)))
mvl_write_object(Mtmp, L, "L")
Mtmp<-mvl_remap(Mtmp)
print(Mtmp$L)

## End(Not run)

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

Related to mvl_write_object in RMVL...