writegdx.parameter {gdxdt} | R Documentation |
writegdx.parameter
Description
Save a data.table to a parameter in a GAMS gdx file.
Usage
writegdx.parameter(gdx, dt, name, valcol, uelcols)
Arguments
gdx |
the gdx filename. |
dt |
a data.table. |
name |
name of the parameter. |
valcol |
name of data column. |
uelcols |
vector of column names with index dimensions. |
Examples
## Not run:
dt <- as.data.table(mtcars, keep.rownames = TRUE)
tmpgdx <- file.path(tempdir(), "test.gdx")
test_var <- "mtcars"
writegdx.parameter(tmpgdx, dt, test_var, valcol="wt", uelcols="rn")
new_dt <- readgdx(tmpgdx, test_var)
## End(Not run)
[Package gdxdt version 0.1.0 Index]