Skip to content

Commit

Permalink
fix : excel reference bug
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarayon committed Aug 8, 2023
1 parent a4ada45 commit 110b587
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/excel_reports.R
Original file line number Diff line number Diff line change
Expand Up @@ -1545,9 +1545,13 @@ excel_group_report_reference <- function(IDEAdata, output_dir, outdir, output_fi
by.y = "node_code"
)[, .(Exploitation, name = node_name, value)][, data.table::dcast(.SD, Exploitation ~ name, value.var = "value")]


ref_list <- unique(subset(reference_list$indic_prop, select = c(indic_code, indic_name)))


indics1 <- merge(
df[, data.table::melt(.SD, id.vars = "Exploitation")][, .(Exploitation, name = variable, value)],
reference_list$indic_prop,
ref_list,
by.x = "name",
by.y = "indic_code"
)[, .(Exploitation, name = indic_name, value)]
Expand Down

0 comments on commit 110b587

Please sign in to comment.