Commit 8296eacf authored by Alec L. Robitaille's avatar Alec L. Robitaille 馃毑

rm NAs in calc_irg

parent 9879e5d9
Pipeline #62470145 passed with stage
......@@ -85,7 +85,9 @@ calc_irg <-
check_col(DT, id, 'id')
check_col(DT, year, 'year')
DT[, irg := (irg - min(irg)) / (max(irg) - min(irg)),
DT[, irg :=
(irg - min(irg, na.rm = TRUE)) /
(max(irg, na.rm = TRUE) - min(irg, na.rm = TRUE)),
by = c(id, year)]
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment