View source: R/plot_summarise.R
plot_summarise | R Documentation |
Get informations about forest inventory plots, like number of individuals, mean DBH, q, height, basal area, volume, etc.
plot_summarise(
df,
plot,
plot_area,
dbh,
th,
.groups,
total_area,
vwb,
vwob,
dh,
age,
dec_places = 4
)
df |
A data frame. |
plot |
Quoted name of the plot variable. used to differentiate the data's plots. If this argument is missing, the defined groups in the data frame will be used, If there are no groups in the data, the function will fail. |
plot_area |
Quoted name of the plot area variable, or a numeric vector with the plot area value. The plot area value must be in square meters. |
dbh |
Optional parameter. Quoted name of the diameter at breast height variable. If supplied, will be used to calculate the mean diameter per plot, quadratic diameter (q), basal area and basal area per hectare. Default |
th |
Optional parameter. Quoted name of the total height variable. If supplied, will be used to calculate the mean total height, and the dominant height variable, if the |
.groups |
Optional argument. Quoted name(s) of grouping variables that can be added to differentiate subdivisions of the data. Default: |
total_area |
Optional argument. Quoted name of the total area variable, or a numeric vector with the total area value. The total area value must be in hectares. Default: |
vwb |
Optional parameter. Quoted name of the volume with bark variable. If supplied, will be used to calculate the total vwb per plot, and vwb per hectare per plot. Default |
vwob |
Optional parameter. Quoted name of the volume without bark variable. If supplied, will be used to calculate the total vwob per plot, and vwob per hectare per plot. Default |
dh |
Optional parameter. Quoted name of the dominant height variable. If supplied, will be used to calculate the mean dominant height per plot. If not, the |
age |
Optional parameter. Quoted name of the age variable. If supplied, will be used to calculate the average age per plot. Default: |
dec_places |
Numeric value for the number of decimal places to be used in the output tables. Default: |
A data frame with informations per plot.
Sollano Rabelo Braga sollanorb@gmail.com
library(forestmangr)
data("exfm21")
head(exfm21)
# Obligatory arguments. Basic informations about the plot.
plot_summarise(exfm21, "PLOT", 810)
# Area values can be numeric, or a variable name
plot_summarise(exfm21, "PLOT", "PLOT_AREA")
# With DBH supplied, we get the mean diameter, quadratic diameter,
# basal area and basal area per hectare:
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH")
# With TH supplied, we get the mean total height and dominant height
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH", "TH_EST")
# With strata supplied, we divide the data into 2 strata
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH", "TH_EST", "STRATA")
# The strata area can also be supplied
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH", "TH_EST", "STRATA", "STRATA_AREA")
# With VWB supplied, we get the total vwb, and vwb per hectare
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH", "TH_EST", "STRATA", "STRATA_AREA",
"VWB")
# With VWOB supplied, we get the total vwob, and vwob per hectare
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH", "TH_EST", "STRATA", "STRATA_AREA",
"VWB", "VWOB")
# If the data already has a dominant height variable, it can also be supplied here
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH", "TH_EST", "STRATA", "STRATA_AREA",
"VWB", "VWOB", "DH")
# With the AGE variable supplied, we get the average age of each plot
plot_summarise(exfm21, "PLOT", "PLOT_AREA", "DBH", "TH_EST", "STRATA", "STRATA_AREA",
"VWB", "VWOB", "DH", "AGE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.