DARTH-git / dampack

Decision Analytic Modeling (DAM) package is a suite of functions for analyzing and visualizing the health economic outputs of mathematical models
34 stars 9 forks source link

Add a progress bar to VOI functions #128

Closed feralaes closed 4 years ago

feralaes commented 4 years ago

Hi @gknowlt , would it be possible to add a progress bar to calc_evppi and calc_evsi? Perhaps you can take the idea of the following code and instead of n_sim use length(v_wtp) for calc_evppi and perhaps n for calc_evsi

if(i/(n_sim/10) == round(i/(n_sim/10),0)) { # display progress every 10%
    cat('\r', paste(i/n_sim * 100, "% done", sep = " "))
  }