MyNixOS website logo
Description

IO for GAMS GDX Files using 'data.table'.

Interfaces GAMS data (*.gdx) files with 'data.table's using the GAMS R package 'gdxrrw'. The 'gdxrrw' package is available on the GAMS wiki: <https://support.gams.com/doku.php?id=gdxrrw:interfacing_gams_and_r>.

gdxdt

Read/Write utilities for GAMS gdx files. Using R's data.table.

Requires GAMS gdxrrw library downloadable from the GAMS wiki.

Install

require(devtools)
install_github("loisel/gdxdt")

gdxdt depends on the gdxrrw library. To use this library you have to set the gams library path via igdx.

Usage

Read parameter, variable or set with symbol name:

dt <- readgdx("filename.gdx", "name")

Read upper bound field of variable, field="l" is the default:

dt <- readgdx("filename.gdx", "variable", field="up")

Write parameter:

dt <- data.table(
	col1=c("a", "b", "c"),
	col2=c("d", "e", "f"))
dt[, value:=runif(1), by="col1"]

writegdx.parameter("test.gdx", dt,
	name="test",
	valcol = "value",
	uelcols = c("col1", "col2"))

Write variable:

dt <- data.table(
	col1=c("a", "b", "c"),
	col2=c("d", "e", "f"))
dt[, value:=runif(1), by="col1"]

writegdx.variable("test.gdx", dt,
	name="test",
	valcol = "value",
	uelcols = c("col1", "col2"),
	field="l")
Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows