R progress indicators
Complicated calculations usually take a lot of time. So how to know the progress status to estimate how much time the program still needs to finish?
So far, I always printed some debugging stuff. So I knew how much is done and what is still to do, but that isn’t a nice solution if you plan to share your application with others (the guys in your dev team or the whole public in general).
The first solutions to indicate the status is just printing something like an iteration number:
Ok, works but sucks ;-) Some days ago I read about an Unicode trick to build a clock on the prompt. Using this the next possibility for status indication is:
It’s much less line consuming. Of course there is also a lot of space to prettify it, for example:
In order to write this article I searched for some more solutions and found one that, more or less, equals my last piece of code.
txtProgressBar is part of the built-in
The last progress bar I want to present is a visual one and comes with the package
The code for this article is attached.