% Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
\name{gdxreshape}
\name{gdxreshape}
\alias{gdxreshape}
\alias{gdxreshape}
\title{Reshape from wide to long and save to GDX}
\title{Reshape from wide to long and save to GDX}
\usage{
\usage{
gdxreshape(
inDF,
symDim,
symName = NULL,
tName = "time",
gdxName = NULL,
setsToo = TRUE,
order = NULL,
setNames = NULL
)
gdxreshape(
gdxreshape(
inDF,
inDF,
symDim,
symDim,
...
@@ -33,9 +44,14 @@ gdxreshape(
...
@@ -33,9 +44,14 @@ gdxreshape(
\item{setNames}{wide dataframe.}
\item{setNames}{wide dataframe.}
}
}
\value{
\value{
A tibble `tbl_df`.
A tibble `tbl_df`.
A tibble `tbl_df`.
}
}
\description{
\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.
`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.
We would like to thank the R GAMS team for this useful function.
}
}
...
@@ -43,8 +59,18 @@ We would like to thank the R GAMS team for this useful function.
...
@@ -43,8 +59,18 @@ We would like to thank the R GAMS team for this useful function.
% Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
\name{updateFarmData}
\name{updateFarmData}
\alias{updateFarmData}
\alias{updateFarmData}
\title{Reshape from wide to long and save to GDX}
\title{Reshape from wide to long and save to GDX
Create sample farms}
\usage{
\usage{
updateFarmData(
filename,
BINDir,
gdxmap,
mapping,
writegdx = TRUE,
cptcoeffs = FALSE,
farmchars = NULL,
cptcoeffsxl = NULL
)
updateFarmData(
updateFarmData(
filename,
filename,
BINDir,
BINDir,
...
@@ -33,15 +45,27 @@ updateFarmData(
...
@@ -33,15 +45,27 @@ updateFarmData(
\item{cptcoeffsxl}{Location of the CPT coefficients excel file}
\item{cptcoeffsxl}{Location of the CPT coefficients excel file}
}
}
\value{
\value{
A tibble `tbl_df`.
A tibble `tbl_df`.
A tibble `tbl_df`.
}
}
\description{
\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'.
`updateFarmData()` creates sample farms by aggregating data based on the weighted mean and the selected mapping for use in FarmDyn.
`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'.
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'.