calcOutput {madrat}R Documentation

calcOutput

Description

Calculate a specific output for which a calculation function exists. The function is a wrapper for specific functions designed for the different possible output types.

Usage

calcOutput(
  type,
  aggregate = TRUE,
  file = NULL,
  years = NULL,
  round = NULL,
  signif = NULL,
  supplementary = FALSE,
  append = FALSE,
  warnNA = TRUE,
  na_warning = NULL,
  try = FALSE,
  regionmapping = NULL,
  ...
)

Arguments

type

output type, e.g. "TauTotal". A list of all available source types can be retrieved with function getCalculations.

aggregate

Boolean indicating whether output data aggregation should be performed or not, "GLO" (or "glo") for aggregation to one global region, "REG+GLO" (or "regglo") for a combination of regional and global data.

file

A file name. If given the output is written to that file in the outputfolder as specified in the config.

years

A vector of years that should be returned. If set to NULL all available years are returned.

round

Number of decimal places to round to. Ignored if NULL. See round() for details.

signif

Number of significant digits to round to. Ignored if NULL. See signif() for details.

supplementary

boolean deciding whether supplementary information such as weight should be returned or not. If set to TRUE a list of elements will be returned!

append

boolean deciding whether the output data should be appended in the existing file. Works only when a file name is given in the function call.

warnNA

boolean deciding whether NAs in the data set should create a warning or not

na_warning

deprecated, please use warnNA instead

try

if set to TRUE the calculation will only be tried and the script will continue even if the underlying calculation failed. If set to TRUE calculation will stop with an error in such a case. This setting will be overwritten by the global setting debug=TRUE, in which try will be always interpreted as TRUE.

regionmapping

alternative regionmapping to use for the given calculation. It will temporarily overwrite the global setting just for this calculation.

...

Additional settings directly forwarded to the corresponding calculation function

Value

magpie object with the requested output data either on country or on regional level depending on the choice of argument "aggregate" or a list of information if supplementary is set to TRUE.

Note

The underlying calc-functions are required to provide a list of information back to calcOutput. Following list entries should be provided:

Author(s)

Jan Philipp Dietrich

See Also

setConfig, calcTauTotal,

Examples

## Not run: 

a <- calcOutput(type = "TauTotal")

## End(Not run)


[Package madrat version 3.6.4 Index]