Open dgromer opened 1 year ago
It seems that this is only a documentation issue.
map_depth(as.list(1:10), 1, ~{print(.x); Sys.sleep(1)}, .progress=T)
works fine.
Sames apply for imap()
.
In your example, .progress
is passed to map()
via ...
. Since you use .depth = 1
, it's not distinguishable whether the progress bar is from map_depth()
or from map()
.
If you use, for example, .depth = 2
as in
map_depth(list(as.list(1:10), as.list(1:10)), 2, ~{print(.x); Sys.sleep(1)}, .progress=T)
you can see that the progress bars come from map()
, not from map_depth()
It's probably possible to add it, it's just quite a bit of work. And it would have to be the style of progress bar where you don't know the total number of iterations, since computing that in advance is likely to be expensive.
With the current design of the
map_depth
function, would it be possible to also add progress bar support?