Newer
Older
% Generated by roxygen2: do not edit by hand
Hugo Scherer
committed
% Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
\name{gdxreshape}
\alias{gdxreshape}
\title{Reshape from wide to long and save to GDX}
\usage{
Hugo Scherer
committed
gdxreshape(
inDF,
symDim,
symName = NULL,
tName = "time",
gdxName = NULL,
setsToo = TRUE,
order = NULL,
setNames = NULL
)
gdxreshape(
inDF,
symDim,
symName = NULL,
tName = "time",
gdxName = NULL,
setsToo = TRUE,
order = NULL,
setNames = NULL
)
}
\arguments{
\item{inDF}{wide dataframe.}
\item{symDim}{wide dataframe.}
\item{symName}{wide dataframe.}
\item{tName}{wide dataframe.}
\item{gdxName}{wide dataframe.}
\item{setsToo}{wide dataframe.}
\item{order}{wide dataframe.}
\item{setNames}{wide dataframe.}
}
\value{
Hugo Scherer
committed
A tibble `tbl_df`.
A tibble `tbl_df`.
}
\description{
Hugo Scherer
committed
`gdxreshape()` formats the data to be saved in GDX into long format. It is imported from the gdxrrw package with a few improvements for performance and usability, since there is a risk of it being removed from the gdxrrw package in the future.
We would like to thank the R GAMS team for this useful function.
`gdxreshape()` formats the data to be saved in GDX into long format. It is imported from the gdxrrw package with a few improvements for performance and usability, since there is a risk of it being removed from the gdxrrw package in the future.
We would like to thank the R GAMS team for this useful function.
}
\examples{
BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx'
gdxbinwider(datafile, BINDir, 'map2binid', 'mapping')
}
\seealso{
Hugo Scherer
committed
\itemize{
\item{\code{\link[gdxrrw]{wgdx]}}}{Write R data to GDX}
\item{\code{\link[gdxrrw]{wgdx.lst]}}}{Write multiple symbols to GDX}
\item{\code{\link[gdxrrw]{wgdx.reshape]}}}{Write multiple symbols to GDX}
\item{\code{\link[tidyr]{pivot_longer]}}}{Make dataframes longer}
}
\item{\code{\link[gdxrrw]{wgdx}}}{Write R data to GDX}
\item{\code{\link[gdxrrw]{wgdx.lst}}}{Write multiple symbols to GDX}
\item{\code{\link[gdxrrw]{wgdx.reshape}}}{Write multiple symbols to GDX}
\item{\code{\link[tidyr]{pivot_longer}}}{Make dataframes longer}