calcOutput: calcOutput

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/calcOutput.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
calcOutput(
  type,
  aggregate = TRUE,
  file = NULL,
  years = NULL,
  round = NULL,
  supplementary = FALSE,
  append = FALSE,
  na_warning = TRUE,
  try = FALSE,
  ...
)

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

A rounding factor. If set to NULL no rounding will occur.

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.

na_warning

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

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.

...

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

1
2
3
4
5
6
## Not run:  

a <- calcOutput(type="TauTotal")


## End(Not run)

madrat documentation built on Dec. 25, 2019, 9:07 a.m.