diff --git a/R/plot_mgt_harv.R b/R/plot_mgt_harv.R index 02f53b8d5bd719f53adfec47b9ba944623a14d3c..c73ec3705894d91b0169c49f4df0789cfa465c11 100644 --- a/R/plot_mgt_harv.R +++ b/R/plot_mgt_harv.R @@ -349,12 +349,11 @@ prepare_stress <- function(mgt_out, years) { stress <- bind_rows(stress_mono, stress_rota) %>% set_names(c('crop', 'water', 'aeration', - 'temperature', 'nitrogen', 'phosphorus')) %>% + 'temperature', 'phosphorus', 'nitrogen')) %>% pivot_longer(., cols = - crop, names_to = 'stress', values_to = 'var') %>% mutate(., stress = factor(stress, levels = c('water', 'aeration', 'temperature', - 'nitrogen', 'phosphorus'))) - + 'phosphorus', 'nitrogen'))) return(stress) }