% Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
% Please edit documentation in R/FarmDynR.R
\name{gdxreshape}
\alias{gdxreshape}
\title{Reshape from wide to long and save to GDX}
\usage{
gdxreshape(
inDF,
symDim,
symName = NULL,
tName = "time",
gdxName = NULL,
setsToo = TRUE,
order = NULL,
setNames = NULL
)
gdxreshape(
inDF,
symDim,
...
...
@@ -29,45 +18,28 @@ gdxreshape(
\arguments{
\item{inDF}{wide dataframe.}
\item{symDim}{wide dataframe.}
\item{symDim}{Dimensions of symbol}
\item{symName}{wide dataframe.}
\item{symName}{Symbol name}
\item{tName}{wide dataframe.}
\item{tName}{"Time"}
\item{gdxName}{wide dataframe.}
\item{gdxName}{Name of gdx file}
\item{setsToo}{wide dataframe.}
\item{setsToo}{if sets too}
\item{order}{wide dataframe.}
\item{order}{order of data}
\item{setNames}{wide dataframe.}
\item{setNames}{name of sets}
}
\value{
A tibble `tbl_df`.
A tibble `tbl_df`.
}
\description{
`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.
% Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
% Please edit documentation in R/FarmDynR.R
\name{updateFarmData}
\alias{updateFarmData}
\title{Reshape from wide to long and save to GDX
Create sample farms}
\usage{
updateFarmData(
filename,
BINDir,
gdxmap,
mapping,
writegdx = TRUE,
cptcoeffs = FALSE,
farmchars = NULL,
cptcoeffsxl = NULL
)
updateFarmData(
filename,
BINDir,
...
...
@@ -45,14 +34,9 @@ updateFarmData(
\item{cptcoeffsxl}{Location of the CPT coefficients excel file}
}
\value{
A tibble `tbl_df`.
A tibble `tbl_df`.
}
\description{
`updateFarmData()` creates sample farms by aggregating data based on the weighted mean and the selected mapping for use in FarmDyn.
For non-numerical globals, it summarises based on the mode using the `Modes()` function. When `writegdx` is `TRUE`, it writes the GDX in the format 'farmData_(mapping).gdx'.
This function has been conceived with the Dutch FADN in mind, please use `fadn2fd()` for EU FADN data.
`updateFarmData()` creates sample farms by aggregating data based on the weighted mean and the selected mapping for use in FarmDyn.
...
...
@@ -61,13 +45,6 @@ For non-numerical globals, it summarises based on the mode using the `Modes()` f
\item{farmIds}{Individual farm Identifiers. This is usually the aggregation (mapping) of your p_farmData file. Whereas here the mapping is just the name of the aggregation, farmIds is a vector of the names of the different farm samples made. For example, if mapping = NUTS0, then famrIds would be AT, BE, BG... etc.}
}
\value{
Writes batch file necessary to run FarmDyn
Writes batch file necessary to run FarmDyn
}
\description{
This function writes the batch file for you. It directly takes the necessary information from runInc.gms in FarmDyn, so the GUI
settings remain the same as you have set them.
This function writes the batch file for you. It directly takes the necessary information from runInc.gms in FarmDyn, so the GUI