# NOT RUN {
# 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", "V", "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', 'G' and 'V'
optimize.plot.design(correlations = opt.corr, variables = c("N", "G", "V"),
dir.result = dir.result)
# Only optimal Pearson's correlations for variables by default
optimize.plot.design(correlations = opt.corr["pearson"],
dir.result = dir.result)
# Optimal Pearson's and Spearman's correlations corresponding to angle-count
# design for all available variables
optimize.plot.design(
correlations = list(pearson = opt.corr$pearson["angle.count.plot"],
spearman = opt.corr$spearman["angle.count.plot"]),
variables <- c("N", "G", "V", "d", "dg", "dgeom", "dharm", "d.0", "dg.0",
"dgeom.0", "dharm.0", "h", "hg", "hgeom", "hharm", "h.0",
"hg.0", "hgeom.0", "hharm.0"),
dir.result = dir.result)
# }
Run the code above in your browser using DataLab