I have been playing around with the R function txtProgressBar(). How can I hijack the function's ability to overwrite the current output in the console?

i.e. the progress bar updates like this:

> some R function
============

becomes

> some R function
========================

NOT

> some R function
============
========================

For example, how do I write function that will display the current time in the console:

> some R function
13:01

becomes

> some R function
13:02

NOT

> some R function
13:01
13:01
13:01
13:01
13:02
13:02
13:02
13:02
Edit
Report