Skip to content

Commit

Permalink
numeric_version
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-sauer authored Feb 15, 2024
1 parent 053a2a3 commit 08317b7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/fullTUTORIAL.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,31 @@
#' Function that produces the complete regional data set required for running the
#' MAgPIE model.
#'
#' @param rev data revision which should be used as input (positive numeric).
#' @param rev data revision which should be used as input (numeric_version).
#' @param dev dev flag for testing
#' @param extra extra text to insert
#' @author David M Chen
#' @seealso
#' \code{\link{readSource}}, \code{\link{getCalculations}}, \code{\link{calcOutput}}
#' @examples
#' \dontrun{
#' retrieveData("tutorial", revision = 12, mainfolder = "pathtowhereallfilesarestored")
#' retrieveData("tutorial", rev = numeric_version("12"),
#' mainfolder = "pathtowhereallfilesarestored")
#' }
#' @importFrom magpiesets findset
#' @importFrom madrat toolGetMapping

fullTUTORIAL <- function(rev = 1, dev = "", extra = "Example Argument") {
fullTUTORIAL <- function(rev = numeric_version("1"), dev = "", extra = "Example Argument") {

# ATTENTION: name of the model in function name must be in capital letters!

"!# @pucArguments extra"

writeLines(extra, "include_extra_text.txt")

if (rev >= 1) {
# Ag GDP
calcOutput("AgGDP", round = 3, file = "fTUTORIAL_ag_gdp.csv")
if (rev >= numeric_version("1")) {
# Ag GDP
calcOutput("AgGDP", round = 3, file = "fTUTORIAL_ag_gdp.csv")
}
if (dev == "test") {
message("Here you could execute code for a hypothetical development version called \"test\"")
Expand Down

0 comments on commit 08317b7

Please sign in to comment.