Skip to content

zoeschindler/qsm2r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qsm2r: Import and analyze QSMs from TreeQSM in R

Description

qsm2r is an R package to read in and analyze QSMs (quantitative structure models) created in Matlab using TreeQSM. QSMs stored in *.mat files can be read in using readQSM(). After changing the cylinder structure of QSMs, the updateQSM() function can be used to update the remaining data in the QSMs (e.g. branch data, crown statistics, ...) based on the edited data. Various summaries of the cylinder and branch data can be derived using a set of summary_cylinder_*() and summary_branch_*() functions. Different types of pruning treatments can be simulated using several pruning_*() functions.

Installation from source

To install the package from github, the package remotes is required.

# install package from github
remotes::install_github("zoeschindler/qsm2r")

Usage

# load qsm
file_path <- system.file("extdata", "QSM_Juglans_regia_M.mat", package="qsm2r")
qsm <- readQSM(file_path)

# get summary
print(qsm)

# show qsm
plot(qsm)

# pruning
qsm <- pruning_conventional(qsm, threshold_m = 3, method = "height", remove = TRUE)

# show pruned qsm
plot(qsm)

# check if branch & overview are up-to-date with cylinder
checkQSM(qsm)

# update branch & overview from cylinder
qsm <- updateQSM(qsm)

# check if branch & overview are up-to-date with cylinder
checkQSM(qsm)

# get summary
print(qsm)

About

Author: Zoe Schindler, Chair of Forest Growth and Dendroecology, University of Freiburg

About

Import and analyze QSMs from TreeQSM in R

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages