You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that the console is cleared after x iterations when the progress bar is called in a function which is wrapped in a loop. In the example below, this happened for me every∼44th iteration. Interestingly, it seems that reduction of the sleep times in this function increases the number of iterations before clearing. In my real application, where the progress bar is used in a much slower function, the console is cleared every 2-3 iteration, which means that I cannot scroll back to check the output.
I have noticed that the console is cleared after x iterations when the progress bar is called in a function which is wrapped in a loop. In the example below, this happened for me every∼44th iteration. Interestingly, it seems that reduction of the sleep times in this function increases the number of iterations before clearing. In my real application, where the progress bar is used in a much slower function, the console is cleared every 2-3 iteration, which means that I cannot scroll back to check the output.
testit <- function(x = sort(runif(20)), ...)
{
pb <- txtProgressBar(...)
for(i in c(0, x, 1)) {Sys.sleep(0.2); setTxtProgressBar(pb, i)}
Sys.sleep(1)
close(pb)
}
iter = 0
while (TRUE) {testit(style = 3); iter = iter + 1; print(paste("done", iter))}
This seems to be a Windows RGUI issue, I am not able to reproduce in RStudio, and AFAIK it has not been reproduced under Linux.
METADATA
The text was updated successfully, but these errors were encountered: