import_treestructs_from_dir: import_treestructs_from_dir

Description Usage Arguments Details Value Examples

View source: R/QSM_funcs.r

Description

utility function to create treestruct dataframe that can be used to create a TreeStructs object

Usage

1
2
3
4
5
6
7
8
import_treestructs_from_dir(
  qsm_path = ".",
  recursive = F,
  qsmver = "by_name",
  qsmtype = c("by_ext", "QSMtree", "treegraph"),
  filematch_pattern = "(\\.mat)|(\\.json)",
  nest = F
)

Arguments

qsm_path

PARAM_DESCRIPTION, Default: '.'

recursive

PARAM_DESCRIPTION, Default: F

qsmver

PARAM_DESCRIPTION, Default: "by_name"

qsmtype

program used to create QSM - currently either QSMtree (.mat) or treegraph (.json). Default: "by_ext" (i.e., .mat = QSMtree, .json = treegraph)

filematch_pattern

regex filematch pattern (used in list.files), Default: "(\.mat)|(\.json)"

nest

nest cylinder dataframes in a column, Default: FALSE

Details

this function extracts the CylData elements of all the "*.mat" files in the indicated directory

Value

OUTPUT_DESCRIPTION

Examples

1
2
3
4
5
6
## Not run: 
if(interactive()){
 my_3d_trees = TreeStructs(dataset = "my_trees", treestructs = import_treestructs_from_dir("./qsm_files"))
 }

## End(Not run)

ashenkin/treestruct documentation built on Oct. 14, 2021, 1:54 a.m.