# NOT RUN {
# simple progressbar
bar = progressbar(format = "[[|][|/-\\][ ]]")
# fancy progressbar using UTF-8 codes
n_operations = 1000
bar2 = progressbar(format="\u25ba[\u2589][\u2580\u2584][\u3000]\u25c4", n_iterations=n_operations)
for(i in 1:n_operations) {
cat("\r", render(bar),sep="")
Sys.sleep(0.01)
}
# }
Run the code above in your browser using DataLab