Skip to content

Commit

Permalink
Merge pull request #3 from fbenke-pik/master
Browse files Browse the repository at this point in the history
read in R script for preprocessing
  • Loading branch information
fbenke-pik authored Apr 16, 2024
2 parents d72ec92 + a6c55fa commit 89f378d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '79272'
ValidationKey: '99145'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
gamstransfer=?ignore
any::lucode2
any::covr
any::madrat
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'piamPlotComparison: Create comparison plots for your model results'
version: 0.0.4
date-released: '2024-04-05'
version: 0.0.5
date-released: '2024-04-16'
abstract: A frameworks to create comparison plots for your model results.
authors:
- family-names: Benke
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: piamPlotComparison
Title: Create comparison plots for your model results
Version: 0.0.4
Date: 2024-04-05
Version: 0.0.5
Date: 2024-04-16
Authors@R: c(
person("Falk", "Benke", , "[email protected]", role = c("aut", "cre")),
person("Christof", "Schoetz", role = "aut")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Create comparison plots for your model results

R package **piamPlotComparison**, version **0.0.4**
R package **piamPlotComparison**, version **0.0.5**

[![CRAN status](https://www.r-pkg.org/badges/version/piamPlotComparison)](https://cran.r-project.org/package=piamPlotComparison) [![R build status](https://github.com/pik-piam/piamPlotComparison/workflows/check/badge.svg)](https://github.com/pik-piam/piamPlotComparison/actions) [![codecov](https://codecov.io/gh/pik-piam/piamPlotComparison/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/piamPlotComparison) [![r-universe](https://pik-piam.r-universe.dev/badges/piamPlotComparison)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -46,7 +46,7 @@ In case of questions / problems please contact Falk Benke <[email protected]>

To cite package **piamPlotComparison** in publications use:

Benke F, Schoetz C (2024). _piamPlotComparison: Create comparison plots for your model results_. R package version 0.0.4, <https://github.com/pik-piam/piamPlotComparison>.
Benke F, Schoetz C (2024). _piamPlotComparison: Create comparison plots for your model results_. R package version 0.0.5, <https://github.com/pik-piam/piamPlotComparison>.

A BibTeX entry for LaTeX users is

Expand All @@ -55,7 +55,7 @@ A BibTeX entry for LaTeX users is
title = {piamPlotComparison: Create comparison plots for your model results},
author = {Falk Benke and Christof Schoetz},
year = {2024},
note = {R package version 0.0.4},
note = {R package version 0.0.5},
url = {https://github.com/pik-piam/piamPlotComparison},
}
```
16 changes: 10 additions & 6 deletions inst/compareScenarios/cs_main.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ if (interactive()) {
# may cause "Undefined control sequence" errors in LaTeX.
try(unloadNamespace("kableExtra"), silent = TRUE)
library(piamPlotComparison)
suppressMessages(library(gridExtra))
options(tidyverse.quiet = TRUE)
library(tidyverse)
Expand Down Expand Up @@ -196,6 +197,7 @@ dataHist <-
dataScen <-
dataScen %>%
filter(period %in% params$yearsScen)
dataHist <-
dataHist %>%
filter(period %in% params$yearsHist, !(model %in% params$modelsHistExclude), !is.na(value)) %>%
Expand Down Expand Up @@ -223,10 +225,6 @@ if (!is.null(params$reg)) {
}
```

```{r quitte}
data <- as.quitte(data)
```


```{r global variables}
on.exit(options(warn = getOption("warn")))
Expand Down Expand Up @@ -273,11 +271,17 @@ if (length(params$sections) == 1 && params$sections == "all") {
}
}
preprocessingFilePath <- if (file.exists("preprocessing.Rmd")) "preprocessing.Rmd" else character(0)
```

```{r include preprocessing}
if (file.exists("preprocessing.R")) {
source("preprocessing.R", local = TRUE)
}
```

```{r include preprocessing, child = preprocessingFilePath}
```{r quitte}
data <- as.quitte(data)
```

```{r remove objects not to be used anymore}
Expand Down

0 comments on commit 89f378d

Please sign in to comment.