standtab: Function to creates a stand for a given imputed-tree-list of...

View source: R/standtab.r

standtabR Documentation

Function to creates a stand for a given imputed-tree-list of a sample plot.

Description

Creates a stand table, i.e. a table that describes the tree density of a forest segregated by a tree-size variable y. The most common example is to use diameter at breast-heigth (i.e., d) as the variable, thus the resulting table is a way to describe the diameter distribution.

Usage

standtab(
  data,
  plot.area,
  y.for.class,
  yclass.amp,
  metric = TRUE,
  want.basal.area = FALSE,
  ...
)

Arguments

data

data frame having the tree list of a sample plot.

plot.area

column name having the plot area in m^{2}.

y.for.class

a text of the column-name having the tree-size variable to be used to segregated the tree density.

yclass.amp

a numeric value establishing the width of each class of the variable y.for.class. The measurement unit must be the same as the one of the variable y.for.class.

metric

is a logic value, the default is to TRUE, thus the diameter d has to be in cm, and the resulting tree-level basal area will be in m^{2}. If metric is FALSE, the diameter d has to be in inches, and the computed tree basal area will be in ft^{2}.

want.basal.area

is a logic value, if set to TRUE, the stand basal area, segregated by the classes of they.for.class is added as a column, next to the tree density one. The basal area column by class is expressed in m^{2}/ha. The default for this option is FALSE.

...

aditional options for basic stats functions.

Details

For a given imputed tree list of a sample plot, tree density is computed by classes of the tree-size variable. Note that the imputed-tree list must have all the tree-level variables needed to compute stand-level variables, such as, diameter and plot size.

Value

Returns a stand table.

Author(s)

Christian Salas-Eljatib.

References

  • Salas-Eljatib C. 2025. Biometría y Modelación Forestal. Borrador de libro, en revisión. 352 p.

Examples


## Dataframe to be used
df<-biometrics::eucaplot2
#see the metadata by typing ?eucaplot2
head(df)
datana::descstat(df[,c("dap","atot")])
## Preparing the treelist, in the required format
df$parce<-1;df$sup.plot<-500;amp.diam=2;
out<-standtab(data=df,plot.area="sup.plot",y.for.class = "dap",
              yclass.amp = amp.diam)
out
#the following sum
sum(out$nha.class)
# must be equal to the stand-level density (in trees/ha)
df$expf<-10000/df$sup.plot;sum(df$expf)
# Do you want to add the stand basal area segregated by `y.for.class`
out2<-standtab(data=df,plot.area="sup.plot",y.for.class = "dap",
               yclass.amp = amp.diam, want.basal.area = TRUE)
out2
#the following sum
sum(out2$gha.class)
# must be equal to the stand-level basal area (in m2/ha)
df$g<-gtree(x=df$dap);df$gtree.ha<-df$g*df$expf;sum(df$gtree.ha)

biometrics documentation built on March 20, 2026, 5:09 p.m.