library(dplyr)
d10_daily <- m4_daily %>% dplyr::filter(id == "D10")
# --- VECTOR ----
value_norm <- normalize_vec(d10_daily$value)
value <- normalize_inv_vec(value_norm,
min = 1781.6,
max = 2649.3)
# --- MUTATE ----
m4_daily %>%
group_by(id) %>%
mutate(value_norm = normalize_vec(value))
Run the code above in your browser using DataLab