Skip to contents

Generates a simple QSM summary (e.g. volume, surface area, dbh, etc.) by totals and branch order.

Usage

qsm_summary(cylinder, radius, triangulation = NULL)

Arguments

cylinder

QSM cylinder data frame

radius

Radius column name either quoted or unquoted.

triangulation

QSM triangulation list. Defaults to NULL. Only supports TreeQSM.

Value

Returns a list

Examples


## SimpleForest Processing Chain
file <- system.file("extdata/QSM.csv", package = "rTwig")
cylinder <- read.csv(file)
cylinder <- update_cylinders(cylinder)
#> Finding Branches
#> Calculating Total Children
#> Building Cylinder Network
#> Caching Network
#> Verifying Topology
#> Calculating Path Metrics
qsm_summary(cylinder, radius)
#> Creating QSM Summary
#> [[1]]
#> # A tidytable: 5 × 3
#>   branch_order tree_volume_L tree_area_m2
#>          <int>         <dbl>        <dbl>
#> 1            0       12.9          0.768 
#> 2            1        8.70         1.07  
#> 3            2        6.46         0.871 
#> 4            3        1.82         0.298 
#> 5            4        0.0723       0.0148
#> 
#> [[2]]
#> # A tidytable: 1 × 8
#>   dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L
#>        <dbl>         <dbl>         <dbl>           <dbl>         <dbl>
#> 1       7.39          3.67          12.9            17.1          30.0
#> # ℹ 3 more variables: stem_area_m2 <dbl>, branch_area_m2 <dbl>,
#> #   tree_area_m2 <dbl>
#> 

# TreeQSM Triangulation
file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- import_qsm(file)
#> Importing TreeQSM
cylinder <- qsm$cylinder
cylinder <- update_cylinders(cylinder)
#> Updating Cylinder Ordering
#> Calculating Total Children
#> Building Cylinder Network
#> Caching Network
#> Verifying Topology
#> Calculating Growth Length
#> Calculating Reverse Branch Order
#> Calculating Branch Segments
#> Calculating Alternate Branch Numbers
#> Calculating Path Metrics
qsm_summary(cylinder, radius, triangulation = qsm$triangulation)
#> Creating QSM Summary
#> [[1]]
#> # A tidytable: 6 × 3
#>   branch_order tree_volume_L tree_area_m2
#>          <int>         <dbl>        <dbl>
#> 1            0       28.7         0.632  
#> 2            1        5.80        0.827  
#> 3            2        3.86        0.732  
#> 4            3        1.06        0.237  
#> 5            4        0.622       0.0785 
#> 6            5        0.0346      0.00693
#> 
#> [[2]]
#> # A tidytable: 1 × 8
#>   dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L
#>        <dbl>         <dbl>         <dbl>           <dbl>         <dbl>
#> 1       7.18          3.69          28.7            11.4          40.1
#> # ℹ 3 more variables: stem_area_m2 <dbl>, branch_area_m2 <dbl>,
#> #   tree_area_m2 <dbl>
#>