|
3 | 3 | #' Function that produces the complete regional data set required for running the |
4 | 4 | #' MAgPIE model. |
5 | 5 | #' |
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). |
7 | 7 | #' @param dev dev flag for testing |
8 | 8 | #' @param extra extra text to insert |
9 | 9 | #' @author David M Chen |
10 | 10 | #' @seealso |
11 | 11 | #' \code{\link{readSource}}, \code{\link{getCalculations}}, \code{\link{calcOutput}} |
12 | 12 | #' @examples |
13 | 13 | #' \dontrun{ |
14 | | -#' retrieveData("tutorial", revision = 12, mainfolder = "pathtowhereallfilesarestored") |
| 14 | +#' retrieveData("tutorial", rev = numeric_version("12"), |
| 15 | +#' mainfolder = "pathtowhereallfilesarestored") |
15 | 16 | #' } |
16 | 17 | #' @importFrom magpiesets findset |
17 | 18 | #' @importFrom madrat toolGetMapping |
18 | 19 |
|
19 | | -fullTUTORIAL <- function(rev = 1, dev = "", extra = "Example Argument") { |
| 20 | +fullTUTORIAL <- function(rev = numeric_version("1"), dev = "", extra = "Example Argument") { |
20 | 21 |
|
21 | 22 | # ATTENTION: name of the model in function name must be in capital letters! |
22 | 23 |
|
23 | 24 | "!# @pucArguments extra" |
24 | 25 |
|
25 | 26 | writeLines(extra, "include_extra_text.txt") |
26 | 27 |
|
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") |
30 | 31 | } |
31 | 32 | if (dev == "test") { |
32 | 33 | message("Here you could execute code for a hypothetical development version called \"test\"") |
|
0 commit comments