Description Usage Arguments Details Value Examples
This function summarizes the matrix AGB_val
given by the function AGBmonteCarlo()
by plot. Or just do the sums
for each plot of the AGB if the argument AGB_val
is the resulting vector from the function computeAGB()
.
1 | summaryByPlot(AGB_val, plot, drawPlot = FALSE, subplot = NULL)
|
AGB_val |
Matrix resulting from the function |
plot |
Vector with the code of plot |
drawPlot |
a logical to draw the plot (see Details) |
subplot |
Data frame, output of the function |
If some trees belong to an unknown plot (i.e. NA value in the plot arguments), their AGB values are randomly assigned
to a plot at each iteration of the AGB monte Carlo approach. Or discarded when using output from computeAGB()
.
The drawPlot
argument is a logical that if it is set TRUE``, a graph will appear with the plot given on absciss and the value of AGB on ordinate, the red segments are the quantile, if
AGB_valis the result of the function [AGBmonteCarlo()]. If the
subplotarguments is set and the
drawPlotis set
TRUE', a graph is drawn with the spatialisation of the plots.
a data frame where:
plot
: the code of the plot
AGB
: AGB value at the plot level
Cred_2.5
: the quantile 2.5% for the plot (when output of AGBmonteCarlo()
is used)
Cred_97.5
: the quantile 97.5% for the plot (when output of AGBmonteCarlo()
is used)
If the subplot
is set, the output is a list with the previous data frame and an sf::st_sf()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Load a database
data(NouraguesHD)
data(KarnatakaForest)
# Modelling height-diameter relationship
HDmodel <- modelHD(D = NouraguesHD$D, H = NouraguesHD$H, method = "log2")
# Retrieving wood density values
KarnatakaWD <- getWoodDensity(KarnatakaForest$genus, KarnatakaForest$species,
stand = KarnatakaForest$plotId
)
# Propagating errors
filt <- KarnatakaForest$plotId %in% c("BSP20", "BSP14")
resultMC <- AGBmonteCarlo(
D = KarnatakaForest$D[filt], WD = KarnatakaWD$meanWD[filt],
errWD = KarnatakaWD$sdWD[filt], HDmodel = HDmodel
)
plot <- KarnatakaForest$plotId[ filt ]
# The summary by plot
summaryByPlot(AGB_val = resultMC$AGB_simu, plot)
# The summary by plot for computeAGB
H <- retrieveH(KarnatakaForest$D[filt], model = HDmodel)$H
AGB <- computeAGB(KarnatakaForest$D[filt], WD = KarnatakaWD$meanWD[filt], H = H)
summaryByPlot(AGB, plot)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.