Learn R Programming

rTwig (version 1.1.0)

run_rtwig: Run Real Twig

Description

Runs all Real Twig steps

Usage

run_rtwig(
  file,
  twig_radius,
  backend = "multisession",
  metrics = TRUE,
  version = NULL,
  smooth = TRUE,
  standardize = FALSE
)

Value

Returns cylinder data frame or list if metrics is true.

Arguments

file

file path to QSM (.mat, .csv, .json)

twig_radius

Twig radius in millimeters

backend

Parallel backend for multi-core processing. Defaults to "multisession" (all platforms), but can be set to "multicore" (MacOS & Linux), "cluster" (all platforms), or a "package::backend" string.

metrics

Calculate tree metrics? Defaults to TRUE.

version

Defaults to NULL. If using a specific version of TreeQSM, the user can specify the version (e.g. 2.4.1, 2.0, etc.).

smooth

Defaults to TRUE, if using TreeQSM. Can be set to FALSE.

standardize

Standardize QSM cylinder data? Defaults to FALSE. Can be set to TRUE.

Examples

Run this code
# \donttest{

## TreeQSM
file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- run_rtwig(file, twig_radius = 4.23)
str(qsm$cylinder)

## SimpleForest
file <- system.file("extdata/QSM.csv", package = "rTwig")
qsm <- run_rtwig(file, twig_radius = 4.23)
str(qsm)
# }

Run the code above in your browser using DataLab