USAID-OHA-SI / gophr

Utility functions related to working with the MER Structured Dataset
https://usaid-oha-si.github.io/gophr/
Other
1 stars 0 forks source link

Add TX_CURR_Lag1 & TX_CURR_Lag2 to snapshot indicator list #13

Closed tessam30 closed 2 years ago

tessam30 commented 2 years ago

When working with reshape_msd(direction = "quarters"), I noticed that gophr is creating results_cumulative based on the snapshot_ind object. Because TX_CURR_Lag1& TX_CURR_Lag2are new to the MSD, these are not included in the snapshot_indobject and the results_cumulative column generated is summing the indicator values rather than keeping most recent.

Hopefully, a quick fix is to fold them into the snapshot_ind object.

https://github.com/USAID-OHA-SI/gophr/blob/main/R/reshape_msd.R#L132-133 - relevant lines in reshape_msd()