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.
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,
writeArgs = NULL,
...
)
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.
output type, e.g. "TauTotal". A list of all available source
types can be retrieved with function getCalculations
.
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.
A file name. If given the output is written to that file in the outputfolder as specified in the config.
A vector of years that should be returned. If set to NULL all available years are returned.
Number of decimal places to round to. Ignored if NULL
. See
round()
for details.
Number of significant digits to round to. Ignored if NULL
.
See signif()
for details.
boolean deciding whether supplementary information such as weight should be returned or not. If set to TRUE a list of elements will be returned!
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.
boolean deciding whether NAs in the data set should create a warning or not
deprecated, please use warnNA
instead
if set to TRUE the calculation will only be tried and the script will continue even if the underlying calculation failed. If set to FALSE 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.
alternative regionmapping to use for the given calculation. It will temporarily overwrite the global setting just for this calculation.
a list of additional, named arguments to be supplied to the corresponding write function
Additional settings directly forwarded to the corresponding calculation function
Jan Philipp Dietrich
setConfig
, calcTauTotal
,
if (FALSE) {
a <- calcOutput(type = "TauTotal")
}
Run the code above in your browser using DataLab