-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Chen
committed
Mar 7, 2022
1 parent
dadf8a7
commit 12deccc
Showing
11 changed files
with
129 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Package: mrtutorial | ||
Type: Package | ||
Title: Tutorial Package For Madrat Package Library | ||
Date: 2022-03-01 | ||
Version: 0.2.7 | ||
Date: 2022-03-07 | ||
Version: 0.2.8 | ||
Authors@R: | ||
person("David Meng-Chuen", "Chen", email = "[email protected]", role = c("aut","cre")) | ||
Description: Example package of mr- world libraries, in conjunction with MAgPIE MADRat tutorial. For more information please see: https://github.com/magpiemodel/tutorials/tree/master/madrat . | ||
|
@@ -20,6 +20,9 @@ Imports: | |
countrycode, | ||
lucode2, | ||
reshape2, | ||
magpiesets | ||
magpiesets, | ||
dplyr, | ||
tidyr, | ||
rlang | ||
Suggests: | ||
covr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#' fullTUTORIALVALIDATION | ||
#' | ||
#' Function that produces the complete validation data set used for evaluation of MAgPIE outputs | ||
#' | ||
#' @param rev data revision which should be used as input (positive numeric). | ||
#' @author Jan Philipp Dietrich, Kristine Karstens | ||
#' @seealso | ||
#' \code{\link{readSource}}, \code{\link{getCalculations}}, \code{\link{calcOutput}} | ||
#' @examples | ||
#' \dontrun{ | ||
#' retrieveData("VALIDATION") | ||
#' } | ||
#' @importFrom madrat getConfig calcOutput | ||
#' @importFrom lucode2 path | ||
|
||
fullTUTORIALVALIDATION <- function(rev = 0.1) { | ||
|
||
# all validation data regional aggregations happens here | ||
|
||
# exitsting "validation.mif" file is loaded if all functions are set to append=TRUE | ||
# Please put the validation.mif into your output folder. | ||
# Use retrieveData("VALIDATION") to create a .tgz | ||
|
||
file.copy(lucode2::path(paste0(getConfig("mainfolder"), "/output/"), "validation.mif"), | ||
lucode2::path(getConfig("outputfolder"), "validation.mif")) | ||
|
||
valfile <- "validation.mif" | ||
|
||
# Add your validation scripts here | ||
calcOutput(type = "ValidPopulation", datasource = "WDI", aggregate = "REG+GLO", | ||
file = valfile, append = TRUE, na_warning = FALSE, try = TRUE) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.