Learn R Programming

omxr (version 0.3.3)

write_all_omx: Write all matrix cores to an OMX file

Description

Write all matrix cores to an OMX file

Usage

write_all_omx(object, file, long = TRUE)

Arguments

object

The object to be written to OMX. May be either a tibble or a list of named matrices.

file

The location of the OMX file.

long

Identify whether the object to be written is a long-format `tibble` (the default, `TRUE`) or a list of named matrices.

Value

List of write function return codes; 0 if successful.

Examples

Run this code
# NOT RUN {
omxfile <- omxr_example("skims.omx")
# long-format (tibble)
skims <- read_all_omx(omxfile, names = c("DIST", "DISTBIKE", "DISTWALK"))
write_all_omx(skims, file = tempfile(fileext = ".omx"))

# list of matrices
skims <- read_all_omx(omxfile, names = c("DIST", "DISTBIKE", "DISTWALK"), long = FALSE)
write_all_omx(skims, file = tempfile(fileext = ".omx"), long = FALSE)

# }

Run the code above in your browser using DataLab