Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qsm_summary() does not accept filtered data without the main stem. #7

Closed
aidanmorales opened this issue Nov 11, 2024 · 1 comment
Closed

Comments

@aidanmorales
Copy link
Owner

aidanmorales commented Nov 11, 2024

If the main stem is missing from the QSM (e.g. from using prune_qsm(invert = TRUE) or dplyr::filter()), the following error is thrown:

Error in if (DBHCyl >= 1.37) { : missing value where TRUE/FALSE needed

This behavior is not intended and needs to be fixed in a future update. An NA value for dbh, and a message to the user will be added.

If a connected structure is provided (e.g. a branch), the function should be dynamic enough to consider it a "tree", but reject disconnected structures (e.g. multiple branches).

@aidanmorales
Copy link
Owner Author

From the changelog:

qsm_summary() is now dynamic and can accept filtered data. If the filtered QSM data is a connected structure (e.g. a branch), the lowest order will be considered as the main stem, and the standard summary will be calculated. If the QSM data is disconnected (e.g. several pruned branches), only total volume and surface area will be calculated, and the user will be notified. Additionally, DBH calculations are also dynamic. If the main stem of a tree or branch is shorter than DBH (1.37 m), DBH will be NA, and the user will be notified. Previously, trying to summarize any filtered data would throw an error (issue #7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant