The `gdxbinwider()` function takes in a GDX file with BIN data as parameters p_farmData_NL and p_farmData2GUI, and a mapping as a set. Then the data is widened, and the output is a tibble.

The `gdxbinwider()` function takes in a GDX file with BIN data as parameters p_farmData_NL and p_farmData2GUI, and a mapping as a set. Then the data is widened, and the output is a tibble.

gdxbinwider(filename, BINDir, gdxmap, mapping)

gdxbinwider(filename, BINDir, gdxmap, mapping)

Arguments

filename

Name of the GDX file with BIN data and mappings.

BINDir

Directory where the FADN data is located.

gdxmap

Name of the set in the GDX file that contains the mapping (e.g. Regs2BINID)

mapping

Column name of the characteristic/variable to be grouped by (e.g. "Regions" or "Regs")

Value

A tibble `tbl_df`.

A tibble `tbl_df`.

See also

Examples

BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx'
gdxbinwider(datafile, BINDir, 'map2binid', 'mapping')
#> Error in rgdx(gdxName, list(name = symName, compress = compress, ts = ts),     squeeze = squeeze, useDomInfo = useDomInfo): GDX file 'inst/extdata/GAMS/FarmDynRexampledata.gdx' not found
BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx'
gdxbinwider(datafile, BINDir, 'map2binid', 'mapping')
#> Error in rgdx(gdxName, list(name = symName, compress = compress, ts = ts),     squeeze = squeeze, useDomInfo = useDomInfo): GDX file 'inst/extdata/GAMS/FarmDynRexampledata.gdx' not found