Skip to content
Snippets Groups Projects
Commit 1dc7e224 authored by Christoph Schürz's avatar Christoph Schürz
Browse files

Fix mixed up p and n stress factors in plotting

parent 085be7fa
No related branches found
No related tags found
No related merge requests found
Package: SWATdoctR
Type: Package
Title: Finding the right diagnoses and treatments for SWAT+ models
Version: 0.1.18
Version: 0.1.19
Author: c(person("Christoph", "Schürz",
email = "christoph.schuerz@ufz.de",
role = c("aut", "cre")),
......
......@@ -329,10 +329,10 @@ prepare_stress <- function(mgt_out, years) {
filter(no_plntkill) %>%
group_by(hru, year, op_typ) %>%
summarise(var4 = max(var4), var5 = max(var5), var3 = max(var3),
var2 = max(var2), var1 = max(var1), .groups = 'drop') %>%
var1 = max(var1), var2 = max(var2), .groups = 'drop') %>%
group_by(hru, op_typ) %>%
mutate(var4 = diff1(var4), var5 = diff1(var5), var3 = diff1(var3),
var2 = diff1(var2), var1 = diff1(var1)) %>%
var1 = diff1(var1), var2 = diff1(var2)) %>%
ungroup() %>%
filter(year %in% years) %>%
select(-hru, -year)
......@@ -343,7 +343,7 @@ prepare_stress <- function(mgt_out, years) {
filter(operation == 'HARVEST') %>%
group_by(hru, op_typ, grw_group) %>%
summarise(var4 = max(var4), var5 = max(var5), var3 = max(var3),
var2 = max(var2), var1 = max(var1), .groups = 'drop') %>%
var1 = max(var1), var2 = max(var2), .groups = 'drop') %>%
ungroup(.) %>%
select(-hru, -grw_group)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment