Learn R Programming

RMVL (version 1.1.0.1)

mvl_write_object: Write R object into MVL file

Description

Write R object into MVL file

Usage

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

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.

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

See Also

mvl_indexed_copy, mvl_merge

Examples

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab