ra_export: Export a model file to a file for external use

View source: R/ra_export.R

ra_exportR Documentation

Export a model file to a file for external use

Description

This function conveniently exports a set of nodes and edges into a xlsx or zip file for external use. The file exported can be used for editing outside R, for the shiny interactive interface of quantrra or imported back into an R session.

Usage

ra_export(m, dir = "model", file = "model", format = "xlsx")

Arguments

m

Model table, can be a single data frame or a list

dir

directory path for the file

format

the format used to export the model file, can be: "zip" or "xlsx"

name

name of the output file (not necessary to add extension)

Value

Function will export a file to the specified location on the operating system.

Examples

m <- quantrra::ASFm # use one of the included example model files

# This will export only the nodes (model table)
ra_export(m = m$nodes, format = "zip")

# We can also add an edge table, used for visualization purposes
ra_export(m = m, format = "xlsx")


jpablo91/QuantRRA documentation built on July 3, 2024, 10:46 p.m.