View source: R/traits_from_qsm.R
| get_stem_sweep | R Documentation |
This function calculates tree sweep from a QSM. Starting with an idealized vector of a straight tree (straight line from top to bottom QSM segment) the function caclucates devations of points along the trunk from the idealized vector. It resturns sweep from each QSM segment so that summary statistics can be computed by the user. See also 'get_stem_deflection()'
get_stem_sweep(qsm, terminus_diam_cm = 4, plot = TRUE)
qsm |
QSM loaded using '[load_qsm()]'. |
terminus_diam_cm |
numeric – the trunk diameter at which is no longer considered trunk |
plot |
boolean – indicates whether graph of sweep should be plotted. |
A data frame with columns:
Height (m) of each trunk segment midpoint.
Perpendicular deviation (m) from the idealized straight stem line.
qsm_file = system.file("extdata", "tree_0744_qsm.txt", package='tReeTraits')
qsm = load_qsm(qsm_file)
print(get_center_of_mass(qsm))
print(get_com_offset(qsm))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.