expand.set: expand.set

View source: R/expand.set.R

expand.setR Documentation

expand.set

Description

Function which expands a GAMS set based on a comparison set. If strings in the set, which should be expanded, exist in the fullset, they are used directly, otherwise it is searched for a set in the gdx file having that name

Usage

expand.set(gdx,x,fullset=NULL)

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)

x

A vector of strings which should be used as a set. Strings are either set element names or names of whole sets.

fullset

a vector of strings used as comparison. If only a single string is supplied it is checked whether this string exists as set in the given gdx file and expanded. In all other cases it is assumed that the strings are single set elements. x must be a subset of fullset! If fullset is NULL it is just assumed that x contains only set names which all have to be expanded.

Value

The expanded set vector.

Author(s)

Jan Philipp Dietrich

See Also

readGDX

Examples


## Not run: expand.set("fulldata.gdx","kbe","kcr")


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