Skip to content

rTwig

1.4.0Package record

Realistic Quantitative Structure Models

0packages depend
2.9Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

Real Twig is a method to correct branch overestimation in quantitative structure models. Overestimated cylinders are correctly tapered using measured twig diameters of corresponding tree species. Supported quantitative structure modeling software includes 'TreeQSM', 'SimpleForest', 'Treegraph', and 'aRchi'. Also included is a novel database of twig diameters and tools for fractal analysis of point clouds.

Changes in 1.4.0

New Features

  • import_leaves(): a new function to import leaves from QSM-FaNNI. The leaves are stored as an rgl::mesh3d() object.
  • export_mesh(): The function now supports multiple 3d mesh formats including, .ply, .obj and .stl. It also supports exporting a QSM to Blender using the QSM Blender Addons format .txt.
  • New database called twigs_index. This is based on qualitative size classes supported by the literature, making it easier to select a twig radius for tree species without twig measurements. More info can be found in the Twigs vignette.
  • plot_qsm():
  • Leaf meshes from import_leaves() or aRchi::add_leaves() can now be plotted with the leaves parameter. Leaf color and transparency can be controlled with lf_color and lf_alpha respectively.
  • Now accepts random color palettes for cylinders, points, or triangulation meshes by setting the *_palette = "random". Additionally, the user can set a random color for each cylinder by setting both color and palette to "random".
  • Transparency options added for point clouds and main stem triangulation mesh with pt_alpha and tri_alpha.
  • Point clouds can now be colored by any variable or palette using pt_color and pt_palette. The user can set a random color for each point by setting both pt_color and pt_palette to random.
  • Any rgl::mesh3d() objects can now be passed to plot_qsm() with the mesh parameter.
  • tree_metrics():
  • modified is a standard output in the tree data frame. This is an average of the binary index of the cylinders modified by Real Twig. The rTwig version and run date are now also saved as version and run_date.
Show all changes in 1.4.0Hide the rest of the changes in 1.4.0
  • volume_change_pct and area_change_pct are standard outputs of the tree data frame. These represent the percent change in total tree volume and surface area using radius and raw_radius.
  • vessel_volume, pipe_area, pipe_radius, and twig_distance_m are standard outputs taken from the base of the QSM.
  • Added first order branches to the branch distribution metrics to better match the output of TreeQSM. These columns include _1 in their column names.
  • path_fraction is now a standard output.

Improvements

  • export_mesh(): The function was entirely reworked using Rcpp for fast and efficient mesh export. All functionality that was dependent on rgl has been implemented in custom C++ functions.
  • Function names now use British English to be consistent with R standards. American spelling will still work interchangeably (e.g. standardize_qsm() vs standardise_qsm().
  • Some functions have been renamed to follow tidy guidelines and have consistency within rTwig and other R packages (e.g. qsm_summary() -\> summarise_qsm()).
  • Fixed a bug in plot_qsm(), where certain variable names conflicted with internal functions, resulting in an error (issue #12).
  • Fixed multiple bugs in tree_metrics():
  • Empty azimuth and zenith factors are now filled with 0, instead of being missing.
  • Issue #15 occurred because the cylinder verification was at too high a level and could not properly create the cylinder network when an error condition was met.
  • Fixed an issue when only a single branch or segment was provided as filtered data, causing the calculations to fail. The user is now show a warning when these edge cases occur.
  • Fixed an issue where crown base height calculations would fail if there was only one first order branch present.
  • Fixed an issue where disconnected data using verify = FALSE would fail crown base calculations due to missing branches (issue #18).
  • run_rtwig(): The user can now use standardize and standardise interchangeably.
  • Updated Twigs vignette with new info and plots.
  • Updated Dictionary vignette describing all standard outputs from tree_metrics().

Breaking Changes

  • import_qsm() is deprecated and has been replaced with import_treeqsm(). The functionality is unchanged, but the name changed to be explicit about its use. import_qsm() still functions, but will be removed in a future rTwig release.
  • qsm_summary() is deprecated and has been replaced with summarise_qsm(). The functionality is unchanged, but the name changed to be consistent with tidy guidelines. qsm_summary() still functions, but will be removed in a future rTwig release.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 9.0 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-08
  • ERROR12 OK, 1 ERROR2026-06-07
  • OK12 OK2026-04-25
Show 5 earlier changesHide 5 earlier changes
  • NOTE12 OK, 2 NOTE2026-04-22
  • ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
  • NOTE12 OK, 2 NOTE2026-04-10
  • ERROR11 OK, 2 NOTE, 1 ERROR2026-04-09
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.4.0
READMEYes · 809 wordsVignettesYes · 6 · dynamicNEWSYes · 100% structured · mentions 1.4.0Citation fileYes · cites a publicationWebsiteYes · pkgdown
Help pages
21 (1 internal)includes a package overview page
Examples that run
88%14 run in a plain check · 2 never run
Exported functions with examples
89%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
33% with a bibliography file

Downloads

2.9K
CRAN downloads in the past year
Rank #10,237 · ~8/day · ~243/mo
Daily download trend is not available in this view yet.
39330 days
99690 days
2.9K1 year
Compare downloads with other packages →
Also on338 r2u

Repository

22Stars
0Forks
1Open issues
0Open PRs
6Releases
293Commits
1Commit identities
forestrylidarqsmrrcpprpackagemodelingr-package
293 commits · Last activity 2026-10-16 · 0% stars, 30d · Default branch at 1.4.0.9000, ahead of CRAN 1.4.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
not measured
Median days to close, 50 most recently updated closed issues
3
Median days to close, 50 most recently updated closed PRs
not measured

Stars over time

2025-10-22 · 122026-09-07 · 22
PracticesBeta

9 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/aidanmorales/rtwig on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-16 · The repository has a site deploy workflow

pkgdown site last built 2026-10-16

CRAN release process (2)
cran-comments.mdrevdep/
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
23 external dependencies (excludes base and recommended)

Installing rTwig adds 61 packages (33 with compiled code, 62 MB of source tarballs). Heaviest: BH 14 MB, data.table 5.7 MB, bslib 5.6 MB.

Depends (1)
R >= 3.5.0
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 1.0.2 (2024), Copyright holder
Author, Copyright holder
Releases (5)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 1.4.0Latest
    record
    2025-03-03 · current release · diff ↗ ·
    added 5 exports
    import_leaves, import_treeqsm, standardise_qsm, summarise_qsm, summarize_qsm
  • 1.3.0
    record
    2024-11-21 · diff ↗
  • 1.2.0
    record
    2024-11-08 · diff ↗ ·
    added 2 exports
    cluster_cloud, prune_qsm
  • 1.1.0
    record
    2024-08-21 · diff ↗ ·
    removed 1 export
    plot_stand
    added 4 exports
    import_treegraph, run_rtwig, standardize_qsm, tree_metrics
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.2
    record
    2024-04-08
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2024-04-08
Total releases
5 / 2 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 3.5.0
Bundled data
2.4 KB / 2 files
Download size
899 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("rTwig")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for rTwig version 1.4.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy