% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{gdxbinwider}
\alias{gdxbinwider}
\title{Join BIN data together, make joined dataset wider, and group by a mapping}
\usage{
gdxbinwider(filename, BINDir, gdxmap, mapping)
}
\arguments{
\item{filename}{Name of the GDX file with BIN data and mappings.}

\item{BINDir}{Directory where the FADN data is located.}

\item{gdxmap}{Name of the set in the GDX file that contains the mapping (e.g. Regs2BINID)}

\item{mapping}{Column name of the characteristic/variable to be grouped by (e.g. "Regions" or "Regs")}
}
\value{
A tibble `tbl_df`.
}
\description{
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.
}
\examples{
BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx'
gdxbinwider(datafile, BINDir, 'map2binid', 'mapping')
}
\seealso{
\itemize{
\item{\code{\link[gdxrrw]{rgdx.param}}}{Load GDX parameters}
\item{\code{\link[gdxrrw]{rgdx.set}}}{Load GDX sets}
\item{\code{\link[tidyr]{pivot_wider}}}{Make dataframes wider}
 }
}