From c6012e92b32564c622e7b93925ec89aa58df73cf Mon Sep 17 00:00:00 2001 From: "Alex K. Hagen" Date: Tue, 17 Dec 2024 17:58:46 +0100 Subject: [PATCH 1/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 149c5d23a..333171c63 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ To edit a mapping in `R`, use: ``` mappingdata <- getMapping("AR6") ... -write.csv2(mappingdata, "test.csv", na = "", row.names = FALSE, quote = FALSE) +write.table(mappingdata, "inst/mappings/test_mapping.csv", na = "", dec = ".", sep = ";", row.names = FALSE, quote = FALSE) ``` Opening the csv files in Excel can be problematic, as it sometimes changes values and quotation marks. From 075b3f8969472f4d0a18f87dc680722eddc48bfd Mon Sep 17 00:00:00 2001 From: "Alex K. Hagen" Date: Tue, 17 Dec 2024 17:59:33 +0100 Subject: [PATCH 2/4] Update tutorial.md --- tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial.md b/tutorial.md index 6db0da3a4..dd1d65c79 100644 --- a/tutorial.md +++ b/tutorial.md @@ -38,7 +38,7 @@ To edit a mapping in `R`, use: ``` mappingdata <- getMapping("AR6") ... -write.csv2(mappingdata, "test.csv", na = "", row.names = FALSE, quote = FALSE) +write.table(mappingdata, "inst/mappings/test_mapping.csv", na = "", dec = ".", sep = ";", row.names = FALSE, quote = FALSE) ``` Opening the csv files in Excel can be problematic, as it sometimes changes values and quotation marks. From f6923f83be9222323fd4872dffdabf1cda95c562 Mon Sep 17 00:00:00 2001 From: ahagen Date: Tue, 17 Dec 2024 18:07:55 +0100 Subject: [PATCH 3/4] Increment version --- .buildlibrary | 2 +- CITATION.cff | 2 +- DESCRIPTION | 2 +- README.md | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 11d5134d4..c957316dd 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '7688342' +ValidationKey: '7708416' AutocreateReadme: yes allowLinterWarnings: no AddInReadme: tutorial.md diff --git a/CITATION.cff b/CITATION.cff index b6363ac2a..bdb3548a5 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,7 +2,7 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'piamInterfaces: Project specific interfaces to REMIND / MAgPIE' -version: 0.38.3 +version: 0.38.4 date-released: '2024-12-17' abstract: Project specific interfaces to REMIND / MAgPIE. authors: diff --git a/DESCRIPTION b/DESCRIPTION index ea9680338..5f88b3237 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: piamInterfaces Title: Project specific interfaces to REMIND / MAgPIE -Version: 0.38.3 +Version: 0.38.4 Date: 2024-12-17 Authors@R: c( person("Falk", "Benke", , "benke@pik-potsdam.de", role = c("aut", "cre")), diff --git a/README.md b/README.md index 333171c63..85ffa4007 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Project specific interfaces to REMIND / MAgPIE -R package **piamInterfaces**, version **0.38.3** +R package **piamInterfaces**, version **0.38.4** [![CRAN status](https://www.r-pkg.org/badges/version/piamInterfaces)](https://cran.r-project.org/package=piamInterfaces) [![R build status](https://github.com/pik-piam/piamInterfaces/workflows/check/badge.svg)](https://github.com/pik-piam/piamInterfaces/actions) [![codecov](https://codecov.io/gh/pik-piam/piamInterfaces/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/piamInterfaces) [![r-universe](https://pik-piam.r-universe.dev/badges/piamInterfaces)](https://pik-piam.r-universe.dev/builds) @@ -120,7 +120,7 @@ In case of questions / problems please contact Falk Benke To cite package **piamInterfaces** in publications use: -Benke F, Richters O (2024). _piamInterfaces: Project specific interfaces to REMIND / MAgPIE_. R package version 0.38.3, . +Benke F, Richters O (2024). _piamInterfaces: Project specific interfaces to REMIND / MAgPIE_. R package version 0.38.4, . A BibTeX entry for LaTeX users is @@ -129,7 +129,7 @@ A BibTeX entry for LaTeX users is title = {piamInterfaces: Project specific interfaces to REMIND / MAgPIE}, author = {Falk Benke and Oliver Richters}, year = {2024}, - note = {R package version 0.38.3}, + note = {R package version 0.38.4}, url = {https://github.com/pik-piam/piamInterfaces}, } ``` From be57e4e3e49785a7b6448d5dd4bca7645e86e27a Mon Sep 17 00:00:00 2001 From: ahagen Date: Tue, 17 Dec 2024 18:13:08 +0100 Subject: [PATCH 4/4] Update README and tutorial --- README.md | 5 +---- tutorial.md | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 85ffa4007..507595d7e 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,7 @@ You can edit the files in LibreOffice Calc using these settings in the Text Impo - String Delimiter: (none) The github diff on a large semicolon-separated file is often unreadable. -For a human-readable output, save the old version of the mapping and run: -``` -remind2::compareScenConf(fileList = c("oldfile.csv", "mappingfile.csv"), row.names = NULL) -``` + ### Creating a new mapping Since templates contain between several hundreds and a few thousand variables, relying on existing mappings can save substantial amounts of work compared to setting up a new mapping from scratch. Since the template itself is most likely built based on earlier templates from other projects, chances are good that existing mappings already provide parts of the required new mapping. Using `R`, we describe a simple way to create a new mapping `mapping_NEW.csv` based on existing mappings. diff --git a/tutorial.md b/tutorial.md index dd1d65c79..3c33827cc 100644 --- a/tutorial.md +++ b/tutorial.md @@ -52,10 +52,7 @@ You can edit the files in LibreOffice Calc using these settings in the Text Impo - String Delimiter: (none) The github diff on a large semicolon-separated file is often unreadable. -For a human-readable output, save the old version of the mapping and run: -``` -remind2::compareScenConf(fileList = c("oldfile.csv", "mappingfile.csv"), row.names = NULL) -``` + ### Creating a new mapping Since templates contain between several hundreds and a few thousand variables, relying on existing mappings can save substantial amounts of work compared to setting up a new mapping from scratch. Since the template itself is most likely built based on earlier templates from other projects, chances are good that existing mappings already provide parts of the required new mapping. Using `R`, we describe a simple way to create a new mapping `mapping_NEW.csv` based on existing mappings.