Skip to content
Snippets Groups Projects
Commit 7cc4a1a5 authored by Svajunas Plunge's avatar Svajunas Plunge
Browse files

fixed nitrogen, phosphorus stress mixup in prepare_stress function

parent bd117e5b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
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