MyNixOS website logo
Description

A Data Interface Between 'GAMS' and R.

Read, analyze, modify, and write 'GAMS' (General Algebraic Modeling System) data. The main focus of 'gamstransfer' is the highly efficient transfer of data with 'GAMS' <https://www.gams.com/>, while keeping these operations as simple as possible for the user. The transfer of data usually takes place via an intermediate GDX (GAMS Data Exchange) file. Additionally, 'gamstransfer' provides utility functions to get an overview of 'GAMS' data and to check its validity.

gamstransfer

gamstransfer is a data interface to efficiently transfer data between GAMS and R.

Quick Start Guide

To install the latest version of gamstransfer from CRAN, use the following command.

install.packages("gamstransfer")

To use gamstransfer, load the package using library(gamstransfer). Following is the code snippet to read data from a GDX file named foo.gdx.

library(gamstransfer)
m = Container$new("foo.gdx")

Dependencies

gamstransfer depends on the following R packages:

  • R6
  • collections
  • Rcpp
  • R.utils

To build this package from source, the following libraries must be installed:

  • zlib

Install a particular release from GitHub

It is recommended that the users install released versions of gamstransfer using

remotes::install_github("GAMS-dev/transfer-r/[email protected]")

All the package dependencies can be installed at once using the install.packages command.

install.packages(c("R6", "collections", "Rcpp", "R.utils"))

Install the development version from GitHub

Installation from the development version is similar to installation from the source. To install the development version, users need to point the installer to the zlib library dependency. There are a couple ways to do it.

  1. You can add zlib to your system environment variable PATH. This is the easier and the recommended way. One can then install gamstransfer using the following command.
remotes::install_github("GAMS-dev/transfer-r/gamstransfer")
  1. You can manually point the installer to zlib using configure.vars argument. An example is shown below.
remotes::install_github("GAMS-dev/transfer-r/[email protected]",
configure.vars=c("INCLUDE_DIR='[path_to_include]' LIB_DIR='[path_to_bin]'"))

or

remotes::install_github("GAMS-dev/transfer-r/[email protected]",
configure.vars=c("LIB_DIR='[path_to_shared_object]'"))
  1. One can also set LIB_DIR and INCLUDE_DIR permanently in the .Renviron file.

Build gamstransfer from source

A quick and easy way to build gamstransfer source package is by running R CMD build . from the package directory. This will generate the package source file. To build a binary package, run R CMD INSTALL . --build from the package directory. This command builds a binary package along with installation.

Install gamstransfer using a pre-build package file

You can install the package from the command line or from the R console.

binary package

To install gamstransfer from command line using a binary package, run the following command.

R CMD INSTALL [binary_file_name]

To install gamstransfer from R console using a binary package, run the following command.

install.packages("[binary_file_name]", type="binary" )

source package

To install gamstransfer from command line using a source package, run the following command.

R CMD INSTALL [source_file_name]

To install gamstransfer from R console using a source package, run the following command.

install.packages("[source_file_name]")

Note that installing from source requires zlib. Please refer to “installing the development version from GitHub” section in this file.

Documentation

You can view the detailed documentation for gamstransferhere.

Feedback

We would love to get feedback on gamstransfer. Please direct your questions to [email protected].

Metadata

Version

3.0.3

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