Skip to contents

Summarize forest inventory data calculating most typical variables

Usage

silv_summary(
  data,
  diameter,
  height,
  plot_size,
  .groups = NULL,
  plot_shape = "circular",
  dmin = 7.5,
  dmax = NULL,
  class_length = 5,
  include_lowest = TRUE,
  which_h0 = "assman",
  which_spacing = "hart"
)

Arguments

data

A tibble

diameter

A column with inventory diameters

height

A column with inventory heights

plot_size

The size of the plot. See silv_ntrees_ha

.groups

A character vector with variables to group by (e.g. plot id, tree species, etc)

plot_shape

The shape of the sampling plot. Either `circular` or `rectangular`

dmin

The minimum inventory diameter in centimeters

dmax

The maximum inventory diameter in centimeters. Values that are greater than `dmax` are included in the greatest class

class_length

The length of the class in centimeters

include_lowest

Logical. If TRUE (the default), the intervals are `[dim1, dim2)`. If FALSE, the intervals are `(dim1, dim2]`

which_h0

The method to calculate the dominant height. See silv_dominant_height

which_spacing

A character with the name of the index (either `hart` or `hart-brecking`). See silv_spacing_index

Value

A list with two tibbles

Details

The function calculates many inventory parameters and returns two tibbles:

- dclass_metrics: metrics summarized by .groups and diametric classes

- group_metrics: metrics summarized by .groups

Examples

silv_summary(
  data      = inventory_samples,
  diameter  = diameter,
  height    = height,
  plot_size = 10,
  .groups   = c("plot_id", "species")
 )
#> $dclass_metrics
#> # A tibble: 57 × 9
#>    plot_id species dclass height ntrees ntrees_ha    h0    dg  g_ha
#>      <int>   <int>  <dbl>  <dbl>  <int>     <dbl> <dbl> <dbl> <dbl>
#>  1       7      27     50  18         3      95.5 19.7   57.9 18.8 
#>  2       7      27     55  17.6       5     159.  19.7   57.9 37.8 
#>  3       7      27     35  16.5       1      31.8 19.7   57.9  3.06
#>  4       7      27     45  14.6       2      63.7 19.7   57.9 10.1 
#>  5       7      27     60  19.1       3      95.5 19.7   57.9 27   
#>  6       7      27     25  12.9       1      31.8 19.7   57.9  1.56
#>  7       7      27    120  20.9       1      31.8 19.7   57.9 36   
#>  8       8      28     55  15.5       1      31.8 17.5   57.6  7.56
#>  9       8      28     60  19.5       1      31.8 17.5   57.6  9   
#> 10       8      81     10   5.87      3      95.5  6.39  16.2  0.75
#> # ℹ 47 more rows
#> 
#> $group_metrics
#> # A tibble: 14 × 15
#>    plot_id species d_mean d_median  d_sd    dg h_mean h_median  h_sd h_lorey
#>      <int>   <int>  <dbl>    <dbl> <dbl> <dbl>  <dbl>    <dbl> <dbl>   <dbl>
#>  1       7      27   54.7       55 19.2   57.9  17.4     17.6  1.92    18.1 
#>  2       8      28   57.5       55  2.5   57.6  17.5     15.5  2       17.7 
#>  3       8      81   15         15  6.12  16.2   6.29     5.87 0.525    6.43
#>  4       8      83   14.3       10  4.95  15.1   5.67     6.10 0.495    5.41
#>  5       8     294   14         15  2     14.1   6.74     7.12 0.770    7.07
#>  6      10      27   86.7       85 16.5   88.2  27.7     28.4  4.03    28.5 
#>  7      10      72   41.2       35  6.50  41.8  13.4     10.8  2.75    13.2 
#>  8      10      81   13.5       15  3.20  13.9   7.38     7.64 0.379    7.50
#>  9      10      83   15         15  3.16  15.3   6.4      6.30 0.155    6.33
#> 10      53      27   41.8       40 11.5   43.4  21.3     19.3  5.11    23.0 
#> 11     189      81   20.7       20  6.51  21.7  11.5     12.6  2.26    12.4 
#> 12     189      82   17.3       15  3.73  17.7  10.2      9.33 1.30     9.85
#> 13     189      83   14.5       15  3.34  14.9   9.18     9.08 0.751    9.26
#> 14     189      84   20.2       20  6.72  21.3  11.6     11.2  1.93    11.6 
#> # ℹ 5 more variables: h0 <dbl>, ntrees <int>, ntrees_ha <dbl>, g_ha <dbl>,
#> #   spacing <dbl>
#>