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?
In case you want to use the function message to print something, you can set its parameter appendLF to FALSE to avoid it printing a new line and then the use the carriage return ('\r') character to return to the start of the line, for example:
for (i in 1:5) {
message('\r', i, appendLF = FALSE)
}