I frequently run by operations that take minutes and sometimes hours to complete. To deal with the uncertainty of what's going on, I often resort to printing .BY in the i-expression:
dt = data.table(a = 1:5)
dt[, {print(.BY)
Sys.sleep(10)
5}
, by = a]
Would be great to have an automatic progress bar for these, similar to fread, if the expected run time is greater than e.g. 30s. Expected run time can be estimated from actual average time spent running the i-expression for each by item so far * number of remaining by items.
I frequently run
byoperations that take minutes and sometimes hours to complete. To deal with the uncertainty of what's going on, I often resort to printing.BYin the i-expression:Would be great to have an automatic progress bar for these, similar to
fread, if the expected run time is greater than e.g. 30s. Expected run time can be estimated from actual average time spent running the i-expression for eachbyitem so far * number of remainingbyitems.