Skip to content

Commit 08317b7

Browse files
authored
numeric_version
1 parent 053a2a3 commit 08317b7

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

R/fullTUTORIAL.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,31 @@
33
#' Function that produces the complete regional data set required for running the
44
#' MAgPIE model.
55
#'
6-
#' @param rev data revision which should be used as input (positive numeric).
6+
#' @param rev data revision which should be used as input (numeric_version).
77
#' @param dev dev flag for testing
88
#' @param extra extra text to insert
99
#' @author David M Chen
1010
#' @seealso
1111
#' \code{\link{readSource}}, \code{\link{getCalculations}}, \code{\link{calcOutput}}
1212
#' @examples
1313
#' \dontrun{
14-
#' retrieveData("tutorial", revision = 12, mainfolder = "pathtowhereallfilesarestored")
14+
#' retrieveData("tutorial", rev = numeric_version("12"),
15+
#' mainfolder = "pathtowhereallfilesarestored")
1516
#' }
1617
#' @importFrom magpiesets findset
1718
#' @importFrom madrat toolGetMapping
1819

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

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

2324
"!# @pucArguments extra"
2425

2526
writeLines(extra, "include_extra_text.txt")
2627

27-
if (rev >= 1) {
28-
# Ag GDP
29-
calcOutput("AgGDP", round = 3, file = "fTUTORIAL_ag_gdp.csv")
28+
if (rev >= numeric_version("1")) {
29+
# Ag GDP
30+
calcOutput("AgGDP", round = 3, file = "fTUTORIAL_ag_gdp.csv")
3031
}
3132
if (dev == "test") {
3233
message("Here you could execute code for a hypothetical development version called \"test\"")

0 commit comments

Comments
 (0)