Closed
Description
library(progress)
pb <- progress_bar$new(format = "processing [:bar] :percent :elapsed | :eta",
total = 100, width = 80)
for (i in 1:100) {
pb$tick()
Sys.sleep(1 / 100)
}
If I run the code in RStudio, there's no problem at all. But if I run the code with rscript
in terminal, then the progress bar is repeatedly printed out like
As long as I remove width
argument, the problem is gone.
Here's my session info:
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] progress_1.0.1
loaded via a namespace (and not attached):
[1] magrittr_1.5 assertthat_0.1 R6_2.0.1 rversions_1.0.0 prettyunits_1.0.0
[6] tools_3.2.0 rstudioapi_0.3.1 RCurl_1.95-4.6 memoise_0.2.1 git2r_0.10.1
[11] digest_0.6.8 bitops_1.0-6 devtools_1.8.0 XML_3.98-1.2
Metadata
Metadata
Assignees
Labels
No labels