inp: inp - *DEPRECEATED!*

View source: R/inp.R

inpR Documentation

inp - DEPRECEATED!

Description

This function is depreceated, please do not use it! Please see the note below for more information. Function to savely read parameters and sets from GDX file. The function creates a warning if the parameter does not exist in the gdx file. Please use this function when you write own GDX output functions.

Usage

inp(gdx, name, ..., react = "warning", as.magpie = FALSE)

Arguments

gdx

a GDX list as created by readGDX, or the file name of a gdx file (file name is recommended as this speeds up the code)

name

name of the parameter or set that should be read

...

Additional names. If the attempt to read 'name' fails, these will be tried in the order given by the user until one is successfully read.

react

determines the reaction, when the parameter or set does not exist. Available options are "warning" (NULL is returned and a warning is send that the parameter or set is missing), "silent" (NULL is returned, but no warning is given) and "error" (The function throws out an error)

as.magpie

If TRUE the content is returned as a MAgPIE object, otherwise as array

Value

The parameter if it exists, otherwise NULL

Note

This function is depreceated! Please use readGDX(...,format="first_found") instead! This will basically give you the same functionality with the only difference that it will return a magpie object instead of an array.

Author(s)

Jan Philipp Dietrich

See Also

out, readGDX

Examples


## Not run: inp("fulldata.gdx","x_modelstat")


pik-piam/gdx documentation built on March 12, 2024, 10:30 a.m.