old_readGDX: old_readGDX

View source: R/old_readGDX.R

old_readGDXR Documentation

old_readGDX

Description

Function to read gdx files in R. - DEPRECEATED!

Usage

old_readGDX(
  file,
  ...,
  restore_zeros = NULL,
  types = c("sets", "equations", "parameters", "variables", "aliases"),
  field = "All",
  format = "simplest"
)

Arguments

file

File name of the gdx file

...

search strings defining the objects that should be read from gdx file, with *-autocompletion. Can also be vectors containing more than one search strings

restore_zeros

Dummy argument for downwards compatibility. Not used anymore! Function will now always try to restore zeros

types

Types of objects that should be extracted. Available options are "sets", "equations", "parameters" and "variables".

field

Defining what kind of information should be returned. "All" means all available data. Other options are "l" (level value), "m" (marginal), "lo" (lower bound), "up" (upper bound) and "s" (scaling factor). In the case that the level value is not part of the field value (all options other than "All" and "l") only values for equations and variables are returned as all other types do not have this kind of information

format

Output format. Four choices are currently available "detailed", "simple", "simplest", "compact" and "raw". "detailed" is the old default which returns a list of lists separating the outputs first in type and afterwards in variable names. "simple" returns a list of variables. If there is more than one object returned "simplest" behaves exactly the same as "simple". However, if only one object is read from gdx file the array itself is returned completely getting rid of the list structure. "raw" is the data in the format as it comes from rgdx. This is especially useful the data should be written again to a gdx file without having much transformations in between. "simplest" is set by default because it is the most convenient output. However, as "simplest" either returns a list of array or an array itself it is harder to use in other functions. "compact" behaves like "simple" with the only difference that data is returned as magclass rather than arrays, which can be especially quite useful for sparse data. Or if you anyway plan to work with magclass objects rather than arrays.

Value

The gdx objects read in the format set with the argument format.

Note

This function is depreceated! Please use readGDX instead!

Author(s)

Jan Philipp Dietrich

See Also

readGDX, writeGDX

Examples


## Not run: old_readGDX("bla.gdx","blub*")


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