export_mat {rTwig}R Documentation

Export MAT

Description

Exports the cylinder data to be visualized with TreeQSM's plot_cylinder_model() function

Usage

export_mat(cylinder, filename)

Arguments

cylinder

QSM cylinder data frame

filename

Desired name of file

Value

Returns a .mat file

Examples



## TreeQSM Processing Chain
file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- import_qsm(file)
cylinder <- qsm$cylinder
cylinder <- update_cylinders(cylinder)

filename <- tempfile(pattern = "TreeQSM_QSM.mat")
export_mat(cylinder, filename)

## SimpleForest Processing Chain
file <- system.file("extdata/QSM.csv", package = "rTwig")
cylinder <- read.csv(file)
cylinder <- update_cylinders(cylinder)

filename <- tempfile(pattern = "SimpleForest_QSM.mat")
export_mat(cylinder, filename)




[Package rTwig version 1.0.2 Index]