scores.tables {amber}R Documentation

Summarize results in a table and a plot

Description

This function merges all tables that have been created by the functions scores.fluxnet.csv or scores.fluxnet.nc, scores.grid.notime, scores.grid.time, and scores.runoff.

Usage

scores.tables(plot.width = 6, plot.height = 5, myMargin = c(4, 13, 3,
  4), inputDir = getwd(), outputDir = FALSE, sortByScore = FALSE,
  defineVariableOrder = FALSE, myVariables = myVariables)

Arguments

plot.width

Number that gives the plot width, e.g. 6

plot.height

Number that gives the plot height, e.g. 5

myMargin

An R object that gives the figure margins, e.g. c(4, 13, 3, 4)

inputDir

A string that gives the input directory, 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.

sortByScore

logical. If TRUE, score table is sorted by overall score. FALSE by default.

defineVariableOrder

Logical. If TRUE, variables are sorted according to the parameter myVariables defined below. Default setting is FALSE.

myVariables

An R object with variable names of variables that should be included in table, e.g. c('GPP', 'RECO', 'NEE')

Value

(1) Two tables in LaTeX format that shows the scores of all variables that were assessed (with and without mass weighting). (2) Two figures in PDF format that show the same information as (1). (3) Two NetCDF files that show the same information as (1). (4) Five tables in LaTeX format that show the globally averaged statistical metrics for calculating a score (without mass weighting). (S_{bias}, S_{rmse}, S_{phase}, S_{iav}, S_{dist}).

Examples


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)

myInputDir <- paste(system.file('extdata', package = 'amber'), 'scores', sep = '/')
scores.tables(inputDir = myInputDir, sortByScore = TRUE)


[Package amber version 1.0.3 Index]