diff --git a/R/plot_mgt_harv.R b/R/plot_mgt_harv.R index ee22f57d8d0b12de29c7244fa1cc6be0d645ed67..d70fe95ee16c05bb065cf5fc58f8ec5c800ef789 100644 --- a/R/plot_mgt_harv.R +++ b/R/plot_mgt_harv.R @@ -181,9 +181,10 @@ filter_hru_at_harvkill <- function(sim_verify, ...) { sim_verify$mgt_out %>% mutate(date = ymd(paste(year, mon, day, sep = '-'))) %>% filter(operation == 'HARVEST') %>% - select(hru, date, op_typ, phuplant, plant_bioms, op_var, var4, var5, var3, var1, var2) %>% - set_names(c('hru', 'date', 'crop', 'phu', 'plant_bioms', 'yield', 'water_stress', 'aero_stress', + select(hru, year, date, op_typ, phuplant, plant_bioms, op_var, var4, var5, var3, var1, var2) %>% + set_names(c('hru','year' , 'date', 'crop', 'phu', 'plant_bioms', 'yield', 'water_stress', 'aero_stress', 'temp_stress', 'n_stress', 'p_stress')) %>% - filter(., ...) + filter(., ...) %>% + select(-year) }