I have some sample code which contains a for loop and creates some plots like this (my actual data creates several thousands of plots):
xy <- structure(li
You could write a very simple one on the fly to show percent completed:
n <- 100
for (ii in 1:n) {
cat(paste0(round(ii / n * 100), '% completed'))
Sys.sleep(.05)
if (ii == n) cat(': Done')
else cat('\014')
}
# 50% completed
Or one to replicate the text bar:
n <- 100
for (ii in 1:n) {
width <- options()$width
cat(paste0(rep('=', ii / n * width), collapse = ''))
Sys.sleep(.05)
if (ii == n) cat('\014Done')
else cat('\014')
}
# ============================