« Strata 2015: Keynote roundup | Main | Talking about R, Data Science and Microsoft on theCUBE »

February 24, 2015


Feed You can follow this conversation by subscribing to the comment feed for this post.

In my past I did this with matlab's parallel offering by launching a Java progress bar and had an open port it listened to. Then each job in the foreach would send a signal to the open port and the progress bar would increment.

It worked really well.

It's a windows only solution, and it's basically the same task as StephenL described. I just added a "bar" argument to my overarching function so i could decide if I wanted to monitor the bars or not (yes for testing on my machine, no for submitting on a cluster)

pb <- winProgressBar(title = "Initializing",
min = 0,max = L, width = 300)}

for (l in 1:L){
... stuff...

setWinProgressBar(pb, l,
title=paste(mod, " Iteration:", round(l/L*100, 0),
"% done"))}


I'm sorry, I forgot to mention that the function that has the above mentioned code was wrapped inside a foreach().

"Sadly, the proposed mechanism didn’t actually work. [...] Meanwhile, can you do better? Is there a way of creating progress bars with foreach in a parallel job?"

Did you check if the last answer from the SO thread worked for you (http://stackoverflow.com/a/26519566/1901527)? It does actually work (I just checked), but as I said in the answer, only under Ubuntu. However, having read the answer by Steve Weston now (http://stackoverflow.com/a/15078540/1901527) I guess that it might also work under Windows when using Rterm instead of Rgui.

The comments to this entry are closed.

Search Revolutions Blog

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr