knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(omxr)
The goal of omxr is to provide a convenient API for R users working with Open Matrix (OMX) format files. For more details on the file standard, see the osPlanning wiki.
We hope to have omxr on CRAN in the near future. Until then, you can install omxr with the devtools package
devtools::install_github("gregmacfarlane/omxr")
With omxr you can examine the contents of existing OMX files within R.
# path to the omx file omx_file <- omxr_example("skims.omx") # list contents list_omx(omx_file)
You can choose to read the matrix as either an R matrix or as a tidyverse-friendly tibble, depending on your needs.
m <- read_omx(omx_file, "DIST") # return an array m[1:5, 1:5] read_all_omx(omx_file, c("DIST", "DISTBIKE", "DISTWALK"))
More detailed examples, including creating and writing to OMX files, are available in the package vignette.
vignette(omxr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.