verbal-autopsy-software / InSilicoVA

R package for InSilicoVA framework
3 stars 6 forks source link

minor bug in printing out warning of indicators with all missing values (actual change in data is ok) #31

Open jarathomas opened 5 months ago

jarathomas commented 5 months ago

https://github.com/verbal-autopsy-software/InSilicoVA/blob/9a2eb1750a050ac29ce35ad9825b8cc3ad5a022c/InSilicoVA/R/insilico_core.r#L1084

External causes have not been removed from probbase, so I think the indexing is off. Something like

 paste( probbase[-external.symps, ][missing.all + 1, 2-as.numeric(data.type == "WHO2016")], collapse = ", ")), 

should do the trick. This is a bit ugly, so maybe include probbase_no_ext <- probbase[-external.symps,] outside/before the call to warning() and then use probbase_no_ext[missing.all + 1, ... in the referenced line.