Description Usage Arguments Value Examples
View source: R/correlationMatrixFluxnet.R
This function produces a correlation matrices for mean values, bias, crmse, phase, and corresponding scores. The input data consist of text files produced by scores.fluxnet.csv.
1 2 3 4 5 | correlationMatrixFluxnet(metric, inputDir, outputDir = FALSE,
fileNames = c("GPP_FLUXNET", "HFLS_FLUXNET", "HFSS_FLUXNET",
"NEE_FLUXNET", "RECO_FLUXNET", "RNS_FLUXNET"),
significanceLevel = 0.01, plot.width = 8, plot.height = 6.8,
plot.margin = c(10, 10, 1, 4))
|
metric |
A string that indicates for what statistical metric the correlation matrix should be computed. Options are 'mod.mean', ref.mean', bias', 'crmse', 'phase', 'bias.score', 'crmse.score', 'phase.score', or 'iav.score'. |
inputDir |
A string that gives the location of text files produced by scores.fluxnet.csv, e.g. '/home/project/study'. |
outputDir |
A string that gives the output directory, e.g. '/home/project/study'. The output will only be written if the user specifies an output directory. |
fileNames |
An object of strings that give the filenames that should be included. The default is c('GPP_FLUXNET', 'HFLS_FLUXNET', 'HFSS_FLUXNET', 'NEE_FLUXNET', 'RECO_FLUXNET', 'RNS_FLUXNET') |
significanceLevel |
A number that gives the desired significance level of a correlation, e.g. 0.01 |
plot.width |
A number that gives the plot width, e.g. 8 |
plot.height |
A number that gives the plot height, e.g. 6.8 |
plot.margin |
An R object that gives the plot margin, e.g. c(10, 10, 1, 4) |
A list with the Spearman correlation coefficient and corresponding p-values, and a Figure of the correlation matrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(amber)
library(classInt)
library(doParallel)
library(foreach)
library(Hmisc)
library(latex2exp)
library(ncdf4)
library(parallel)
library(raster)
library(rgdal)
library(rgeos)
library(scico)
library(sp)
library(stats)
library(utils)
library(viridis)
library(xtable)
inputDir <- paste(system.file('extdata', package = 'amber'), 'scores', sep = '/')
correlationMatrixFluxnet(metric = 'bias', inputDir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.