optimize.plot.design {FORTLS} | R Documentation |
Optimize Plot Design Based on Optimal Correlations
Description
Generation of interactive heatmaps graphically represent the optimal correlations between variables estimated from field data, and metrics derived from TLS data. These data must be derived from any of the three different plot designs currently available (circular fixed area, k-tree and angle-count) and correspond to plots with incremental values for the plot design parameter (radius, k and BAF, respectively). In addition, correlation measures that are currently admissible are Pearson's correlation coefficient and/or Spearman's rho.
Usage
optimize.plot.design(correlations,
variables = c("N", "G", "V", "d", "dg", "d.0", "h", "h.0"),
dir.result = NULL)
Arguments
correlations |
List including the optimal correlations between field estimations and TLS
metrics. The structure and format must be analogous to the
|
variables |
Optional character vector naming field estimations whose optimal correlations
will be represented graphically in the heatmaps generated during the
execution. If this argument is specified by the user, it must include at
least one of the following character strings: “ |
dir.result |
Optional character string naming the absolute path of an existing directory
where files described in ‘Output Files’ section will be saved.
|
Details
This function represents graphically, by means of interactive heatmaps, the strongest correlations (positive or negative) for each plot design and size simulated, between the
estimated variables based on field data specified in the variables
argument, and metrics derived from TLS data, under circular fixed area, k-tree and/or
angle-count plot designs.
Two correlation measures are implemented at present: Pearson’s correlation
coefficient and Spearman’s rho. Hence, only optimal correlations based on correlations
arguments will be taken into account during the
execution.
For each correlation measure and plot design, at least one no missing value for optimal correlations must be represented; otherwise, execution will be stopped, and an error message will appear. In addition, at least two different no missing values for optimal correlations are required to ensure that the colour palette is correctly applied when the heatmap is generated.
Value
Invisible NULL
.
Output Files
During the execution, interactive heatmaps graphically representing optimal
correlations values between field estimations and TLS metrics are created and
saved in dir.result
directory by means of the saveWidget
function in the htmlwidgets package. The widgets generated allow users
to consult optimal correlations values and TLS metrics to which they correspond
directly on the plots, to zoom and scroll, and so on. The pattern used for
naming these files is ‘opt.correlations.<plot design>.<method>.html’,
where ‘<plot design>’ equals “fixed.area.plot
”,
“k.tree.plot
” or “angle.count.plot
” according to
plot design, and ‘<method>’ equals “pearson
” or
“spearman
” according to correlation measure.
Note
This function is key to choosing the best possible plot design (in terms of correlation measures) considering all variables of interest before establishing definitive sampling design.
Author(s)
Juan Alberto Molina-Valero and Adela Martínez-Calvo.
See Also
Examples
# Load field estimations and TLS metrics corresponding to Rioja data set
data("Rioja.simulations")
# Compute correlations between field estimations and TLS metrics corresponding
# to Rioja example, and select optimal correlations results
corr <- correlations(simulations = Rioja.simulations,
variables = c("N", "G", "d", "dg", "dgeom","dharm",
"d.0", "dg.0", "dgeom.0", "dharm.0", "h",
"hg", "hgeom", "hharm", "h.0", "hg.0",
"hgeom.0", "hharm.0"),
save.result = FALSE)
opt.corr <- corr$opt.correlations
# Establish directory where optimal correlations heatmaps corresponding to Rioja
# example will be saved. For instance, current working directory
dir.result <- getwd()
# Generate heatmaps for optimal correlations between field estimations and TLS
# metrics corresponding to Rioja example
# Optimal Pearson's and Spearman's correlations for variables by default
# optimize.plot.design(correlations = opt.corr, dir.result = dir.result)
# Optimal Pearson's and Spearman's correlations for variables 'N' and 'G'
optimize.plot.design(correlations = opt.corr, variables = c("N", "G"),
dir.result = dir.result)