% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R % 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.
BINDir <- "inst/extdata/GAMS" BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx' datafile <- 'FarmDynRexampledata.gdx'
gdxbinwider(datafile, BINDir, 'map2binid', 'mapping') gdxbinwider(datafile, BINDir, 'map2binid', 'mapping')
BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx'
gdxbinwider(datafile, BINDir, 'map2binid', 'mapping')
} }
\seealso{ \seealso{
\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}
}
\itemize{ \itemize{
\item{\code{\link[gdxrrw]{wgdx]}}}{Write R data to GDX} \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.lst]}}}{Write multiple symbols to GDX}
......
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R % Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
\name{groupstats} \name{groupstats}
\alias{groupstats} \alias{groupstats}
\title{Generate descriptive statistics and save to GDX} \title{Generate descriptive statistics and save to GDX}
\usage{ \usage{
groupstats(
filename,
BINDir,
gdxmap,
mapping,
cols,
w,
writegdx = TRUE,
filtern = FALSE
)
groupstats( groupstats(
filename, filename,
BINDir, BINDir,
...@@ -33,9 +44,15 @@ groupstats( ...@@ -33,9 +44,15 @@ groupstats(
\item{filtern}{Logical. If `TRUE`, results will be limited to more than 15 observations per variable for reporting} \item{filtern}{Logical. If `TRUE`, results will be limited to more than 15 observations per variable for reporting}
} }
\value{ \value{
A tibble `tbl_df`.
A tibble `tbl_df`. A tibble `tbl_df`.
} }
\description{ \description{
`groupstats()` returns descriptive statistics per group based on the mapping given. For example, if your mapping
is 'regions', this function will give you the weighted mean, median, min, max, number of observations per variable for each
region based on the individual farm data. When `writegdx` is `TRUE`, it writes the GDX in the format 'farmStats_(mapping).gdx'
`groupstats()` returns descriptive statistics per group based on the mapping given. For example, if your mapping `groupstats()` returns descriptive statistics per group based on the mapping given. For example, if your mapping
is 'regions', this function will give you the weighted mean, median, min, max, number of observations per variable for each is 'regions', this function will give you the weighted mean, median, min, max, number of observations per variable for each
region based on the individual farm data. When `writegdx` is `TRUE`, it writes the GDX in the format 'farmStats_(mapping).gdx' region based on the individual farm data. When `writegdx` is `TRUE`, it writes the GDX in the format 'farmStats_(mapping).gdx'
...@@ -43,6 +60,14 @@ region based on the individual farm data. When `writegdx` is `TRUE`, it writes t ...@@ -43,6 +60,14 @@ region based on the individual farm data. When `writegdx` is `TRUE`, it writes t
\examples{ \examples{
BINDir <- "inst/extdata/GAMS" BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx' datafile <- 'FarmDynRexampledata.gdx'
groupstats('FarmDynRexampledata.gdx',
BINDir="inst/extdata/GAMS/",
gdxmap = 'map2binid',
mapping = 'mapping',
cols = c('a', 'b'),
w='Weight')
BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx'
groupstats('FarmDynRexampledata.gdx', groupstats('FarmDynRexampledata.gdx',
BINDir="inst/extdata/GAMS/", BINDir="inst/extdata/GAMS/",
gdxmap = 'map2binid', gdxmap = 'map2binid',
...@@ -51,6 +76,14 @@ groupstats('FarmDynRexampledata.gdx', ...@@ -51,6 +76,14 @@ groupstats('FarmDynRexampledata.gdx',
w='Weight') w='Weight')
} }
\seealso{ \seealso{
\itemize{
\item{\code{\link{summary]}}}{summary statistics}
\item{\code{\link[psych]{describe}}}{Descriptive statistics}
\item{\code{\link[gdxrrw]{wgdx}}}{Write R data to GDX}
\item{\code{\link[gdxrrw]{wgdx.lst}}}{Write multiple symbols to GDX}
\item{\code{\link[tidyr]{pivot_longer}}}{Make dataframes longer}
}
\itemize{ \itemize{
\item{\code{\link{summary]}}}{summary statistics} \item{\code{\link{summary]}}}{summary statistics}
\item{\code{\link[psych]{describe}}}{Descriptive statistics} \item{\code{\link[psych]{describe}}}{Descriptive statistics}
......
man/is.nan.data.frame.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{is.nan.data.frame}
\alias{is.nan.data.frame}
\title{`is.nan.data.frame()` checks if there are any NaNs in a dataframe (`is.nan()` does not work for dfs)}
\usage{
\method{is.nan}{data.frame}(x)
}
\arguments{
\item{x}{A dataframe}
}
\value{
A dataframe with TRUE or FALSE for each column
}
\description{
`is.nan.data.frame()` checks if there are any NaNs in a dataframe (`is.nan()` does not work for dfs)
}
man/load_dump_marg.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{load_dump_marg}
\alias{load_dump_marg}
\title{`load_dump_marg()` loads any marginal from the dump gdx files}
\usage{
load_dump_marg(res_fold, scen_name, marginal)
}
\arguments{
\item{res_fold}{Path to the folder where the gdx files are}
\item{scen_name}{Name of the scenarios to load}
\item{marginal}{Name of the marginal to load}
}
\value{
A data.table with the marginal
}
\description{
`load_dump_marg()` loads any marginal from the dump gdx files
}
man/load_dump_par.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{load_dump_par}
\alias{load_dump_par}
\title{`load_dump_par()` loads any parameter from the dump gdx files}
\usage{
load_dump_par(res_fold, scen_name, param, names = NULL)
}
\arguments{
\item{res_fold}{Path to the folder where the gdx files are}
\item{scen_name}{Name of the scenarios to load}
\item{param}{Name of the parameter to load}
\item{names}{Names of the columns to load}
}
\value{
A data.table with the parameters
}
\description{
`load_dump_par()` loads any parameter from the dump gdx files
}
man/load_dump_scalar.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{load_dump_scalar}
\alias{load_dump_scalar}
\title{`load_dump_scalar()` loads any scalar from the dump gdx files}
\usage{
load_dump_scalar(res_fold, scen_name, scalar)
}
\arguments{
\item{res_fold}{Path to the folder where the gdx files are}
\item{scen_name}{Name of the scenarios to load}
\item{scalar}{Name of the scalar to load}
}
\value{
A data.table with the scalar
}
\description{
`load_dump_scalar()` loads any scalar from the dump gdx files
}
\examples{
load_dump_scalar(res_fold = res_fold, scen_name = scen_name, scalar = "p_Nmin")
}
man/load_dumps.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{load_dumps}
\alias{load_dumps}
\title{`load_dumps()` loads the p_res from the dump gdx files}
\usage{
load_dumps(res_fold, scen_name)
}
\arguments{
\item{res_fold}{Path to the folder where the gdx files are}
\item{scen_name}{Name of the scenarios to load}
}
\value{
A data.table with the parameters
}
\description{
`load_dumps()` loads the p_res from the dump gdx files
}
man/pipe.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-pipe.R
\name{\%>\%}
\alias{\%>\%}
\title{Pipe operator}
\usage{
lhs \%>\% rhs
}
\arguments{
\item{lhs}{A value or the magrittr placeholder.}
\item{rhs}{A function call using the magrittr semantics.}
}
\value{
The result of calling `rhs(lhs)`.
}
\description{
See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
}
\keyword{internal}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{replace_first_match_col}
\alias{replace_first_match_col}
\title{`replace_first_match_col()` replaces the name of the column in `first_match_col()` with what the user inputs}
\usage{
replace_first_match_col(x, pattern, how = c("all", "any"), replace_with)
}
\arguments{
\item{x}{A dataframe}
\item{pattern}{A pattern to match}
\item{how}{How to match the pattern (all or any)}
\item{replace_with}{The name to replace the column name with}
}
\value{
dataframe with the replaced column name
}
\description{
`replace_first_match_col()` replaces the name of the column in `first_match_col()` with what the user inputs
}
\examples{
data <- data.frame(a = c("a", "b", "c"), b = c("a", " ", "c"), c = c("a", "b", "1"))
replace_first_match_col(data, "\\\\D", "all", "new")
replace_first_match_col(data, "\\\\d", "any", "new")
}
man/rgdx.var.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{rgdx.var}
\alias{rgdx.var}
\title{Improved function to load variables from gdx files (from Renger in GAMSWorld forum)}
\usage{
rgdx.var(varname, scen_name, res_fold)
}
\arguments{
\item{varname}{Name of the variable to load}
\item{scen_name}{Name of the scenarios to load}
\item{res_fold}{Path to the folder where the gdx files are}
}
\value{
A data.table with the variable
}
\description{
Improved function to load variables from gdx files (from Renger in GAMSWorld forum)
}
\references{
https://forum.gamsworld.org/viewtopic.php?t=9966
}
man/rm_lown.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{rm_lown}
\alias{rm_lown}
\title{`rm_lown()` removes aggregated farms with less than 15 farms for reporting}
\usage{
rm_lown(data, farm_data)
}
\arguments{
\item{data}{A dataframe with the data to plot}
\item{farm_data}{A dataframe with the farm data}
}
\value{
A dataframe with the data without the aggregated farms
}
\description{
`rm_lown()` removes aggregated farms with less than 15 farms for reporting
}
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R % Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
\name{runFarmDynfromBatch} \name{runFarmDynfromBatch}
\alias{runFarmDynfromBatch} \alias{runFarmDynfromBatch}
\title{Execute FarmDyn} \title{Execute FarmDyn}
\usage{ \usage{
runFarmDynfromBatch(FarmDynDir, IniFile, XMLFile, BATCHDir, BATCHFile)
runFarmDynfromBatch(FarmDynDir, IniFile, XMLFile, BATCHDir, BATCHFile) runFarmDynfromBatch(FarmDynDir, IniFile, XMLFile, BATCHDir, BATCHFile)
} }
\arguments{ \arguments{
...@@ -18,15 +20,23 @@ runFarmDynfromBatch(FarmDynDir, IniFile, XMLFile, BATCHDir, BATCHFile) ...@@ -18,15 +20,23 @@ runFarmDynfromBatch(FarmDynDir, IniFile, XMLFile, BATCHDir, BATCHFile)
\item{BATCHFile}{Name of the .batch file} \item{BATCHFile}{Name of the .batch file}
} }
\value{ \value{
Executes FarmDyn from R
Executes FarmDyn from R Executes FarmDyn from R
} }
\description{ \description{
`runFarmDynfromBatch()` does as it says in the function.
`runFarmDynfromBatch()` does as it says in the function. `runFarmDynfromBatch()` does as it says in the function.
} }
\examples{ \examples{
TODO write example TODO write example
TODO write example
} }
\seealso{ \seealso{
*Globiom?
*Globiom? *Globiom?
} }
man/scen_analysis.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{scen_analysis}
\alias{scen_analysis}
\title{Data analysis function for repeated tasks
This loads p_res from different scenarios}
\usage{
scen_analysis(res_fold, scen_name)
}
\arguments{
\item{res_fold}{Path to the folder where the gdx files are}
\item{scen_name}{Name of the scenarios to load}
}
\value{
A data.table with the parameters
}
\description{
Data analysis function for repeated tasks
This loads p_res from different scenarios
}
man/scen_diff.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{scen_diff}
\alias{scen_diff}
\title{Calculates the relative difference of the reference and the scenarios in a new column}
\usage{
scen_diff(data, vars_to_diff)
}
\arguments{
\item{data}{A dataframe}
\item{vars_to_diff}{A vector with the names of the variables to calculate the difference}
}
\value{
A dataframe with the new columns
}
\description{
Calculates the relative difference of the reference and the scenarios in a new column
}
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R % Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
\name{str_line_replace} \name{str_line_replace}
\alias{str_line_replace} \alias{str_line_replace}
\alias{str_firstLine_replace} \alias{str_firstLine_replace}
...@@ -15,6 +15,17 @@ str_line_replace( ...@@ -15,6 +15,17 @@ str_line_replace(
str_firstLine_replace(str, pattern, replacement) str_firstLine_replace(str, pattern, replacement)
str_lastLine_replace(str, pattern, replacement)
str_line_replace(
str,
pattern,
replacement,
which = c("first", "last", "poles", "all")
)
str_firstLine_replace(str, pattern, replacement)
str_lastLine_replace(str, pattern, replacement) str_lastLine_replace(str, pattern, replacement)
} }
\arguments{ \arguments{
...@@ -27,9 +38,17 @@ str_lastLine_replace(str, pattern, replacement) ...@@ -27,9 +38,17 @@ str_lastLine_replace(str, pattern, replacement)
\item{which}{which one? first, last, all or the poles (first AND last)} \item{which}{which one? first, last, all or the poles (first AND last)}
} }
\value{ \value{
string
string string
} }
\description{ \description{
These functions serve to change the first or last line of strings which match a specific pattern (regex).
`str_firstLine_replace()` replaces the first line that matches the pattern.
`str_lastLine_replace()` replaces the last line that matches the pattern
They are useful, for example, when reading a text file with many lines and you want to preserve the lines of that text file.
When `which='all'`, it is a wrapper for `stringr::str_replace()`.
These functions serve to change the first or last line of strings which match a specific pattern (regex). These functions serve to change the first or last line of strings which match a specific pattern (regex).
`str_firstLine_replace()` replaces the first line that matches the pattern. `str_firstLine_replace()` replaces the first line that matches the pattern.
`str_lastLine_replace()` replaces the last line that matches the pattern `str_lastLine_replace()` replaces the last line that matches the pattern
...@@ -38,6 +57,17 @@ When `which='all'`, it is a wrapper for `stringr::str_replace()`. ...@@ -38,6 +57,17 @@ When `which='all'`, it is a wrapper for `stringr::str_replace()`.
} }
\examples{ \examples{
somelines <- c('AAAAA', 'textytext', 'BBBBB', 'AAAAA', 'writingwriting', 'AAAAA', 'etc', 'etc', 'BBBBB')
str_firstLine_replace(somelines, 'AAAAA', 'changedfirstline')
str_lastLine_replace(somelines, 'AAAAA', 'changedlastline')
str_line_replace(somelines, 'AAAAA', 'changedpoles', which='poles')
str_line_replace(somelines, 'AAAAA', 'changedall', which='all')
somelines <- c('AAAAA', 'textytext', 'BBBBB', 'AAAAA', 'writingwriting', 'AAAAA', 'etc', 'etc', 'BBBBB') somelines <- c('AAAAA', 'textytext', 'BBBBB', 'AAAAA', 'writingwriting', 'AAAAA', 'etc', 'etc', 'BBBBB')
str_firstLine_replace(somelines, 'AAAAA', 'changedfirstline') str_firstLine_replace(somelines, 'AAAAA', 'changedfirstline')
...@@ -50,5 +80,7 @@ str_line_replace(somelines, 'AAAAA', 'changedall', which='all') ...@@ -50,5 +80,7 @@ str_line_replace(somelines, 'AAAAA', 'changedall', which='all')
} }
\seealso{ \seealso{
[stringr::str_replace()]
[stringr::str_replace()] [stringr::str_replace()]
} }
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R % 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'.
} }
\examples{ \examples{
BINDir <- "inst/extdata/GAMS" BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx' datafile <- 'FarmDynRexampledata.gdx'
updateFarmData('FarmDynRexampledata.gdx',
&BINDir="inst/extdata/GAMS/",
&gdxmap = 'map2binid',
&mapping = 'mapping',
&w='Weight')
BINDir <- "inst/extdata/GAMS"
datafile <- 'FarmDynRexampledata.gdx'
updateFarmData('FarmDynRexampledata.gdx', updateFarmData('FarmDynRexampledata.gdx',
&BINDir="inst/extdata/GAMS/", &BINDir="inst/extdata/GAMS/",
&gdxmap = 'map2binid', &gdxmap = 'map2binid',
...@@ -49,6 +73,15 @@ updateFarmData('FarmDynRexampledata.gdx', ...@@ -49,6 +73,15 @@ updateFarmData('FarmDynRexampledata.gdx',
&w='Weight') &w='Weight')
} }
\seealso{ \seealso{
\itemize{
\item{\code{\link[FarmDynR]{gdxbinwider}}}{Widens BIN data directly from GDX}
\item{\code{\link[FarmDynR]{gdxreshape}}}{Lengthens data and saves to GDX}
\item{\code{\link[gdxrrw]{wgdx}}}{Write R data to GDX}
\item{\code{\link[gdxrrw]{wgdx.lst}}}{Write multiple symbols to GDX}
\item{\code{\link[dplyr]{summarise}}}{Make dataframes longer}
\item{\code{\link{weighted.mean]}}}{Calculates weighted mean}
}
\itemize{ \itemize{
\item{\code{\link[FarmDynR]{gdxbinwider}}}{Widens BIN data directly from GDX} \item{\code{\link[FarmDynR]{gdxbinwider}}}{Widens BIN data directly from GDX}
\item{\code{\link[FarmDynR]{gdxreshape}}}{Lengthens data and saves to GDX} \item{\code{\link[FarmDynR]{gdxreshape}}}{Lengthens data and saves to GDX}
......
man/vars_dump.Rd 0 → 100644
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{vars_dump}
\alias{vars_dump}
\title{Load variables from dump gdx files and return a data.table}
\usage{
vars_dump(res_fold, varname, scen_name)
}
\arguments{
\item{res_fold}{Path to the folder where the gdx files are}
\item{varname}{Name of the variable to load}
\item{scen_name}{Name of the scenarios to load}
}
\value{
A data.table with the variable
}
\description{
Load variables from dump gdx files and return a data.table
}
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R % Please edit documentation in R/FarmDynR backup.R, R/FarmDynR.R
\name{writeBatch} \name{writeBatch}
\alias{writeBatch} \alias{writeBatch}
\title{Write batch file for batch file execution mode in FarmDyn} \title{Write batch file for batch file execution mode in FarmDyn}
\usage{ \usage{
writeBatch(FarmDynDir, mapping, farmIds)
writeBatch(FarmDynDir, mapping, farmIds) writeBatch(FarmDynDir, mapping, farmIds)
} }
\arguments{ \arguments{
...@@ -12,16 +14,25 @@ writeBatch(FarmDynDir, mapping, farmIds) ...@@ -12,16 +14,25 @@ writeBatch(FarmDynDir, mapping, farmIds)
\item{mapping}{Column name of the characteristic/variable to be grouped by (e.g. "Regions" or "Regs")} \item{mapping}{Column name of the characteristic/variable to be grouped by (e.g. "Regions" or "Regs")}
} }
\value{ \value{
Writes batch file necessary to run FarmDyn
Writes batch file necessary to run FarmDyn Writes batch file necessary to run FarmDyn
} }
\description{ \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 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. settings remain the same as you have set them.
} }
\examples{ \examples{
TODO write example TODO write example
TODO write example
} }
\seealso{ \seealso{
\code{\link[FarmDynR]{runFarmDynfromBatch}}
\code{\link[FarmDynR]{runFarmDynfromBatch}} \code{\link[FarmDynR]{runFarmDynfromBatch}}
} }