extract.gdx: Extract parameter or variable data from the gdx file

View source: R/gdx.R

extract.gdxR Documentation

Extract parameter or variable data from the gdx file

Description

Extract parameter or variable data from the gdx file

Usage

## S3 method for class 'gdx'
extract(x, item, field = "l", addgdx = F, ...)

Arguments

x

the gdx object

item

the name of the item to extract

field

the field of the variable to be extracted. Can be 'l', 'm', 'lo' 'up', respectively for level, marginal, lower bound, upper bound. Defaults to level.

addgdx

if TRUE, the data.frame will get an extra column with the filename of the gdx.

Author(s)

Laurent Drouet

Examples

 ## Not run: 
    mygdx <- gdx('results.gdx')
    travel_cost <- mygdx["travel_cost"]
    travel_cost <- extract(mygdx,"travel_cost")
 
## End(Not run)


lolow/gdxtools documentation built on May 19, 2024, 3:19 p.m.