How to supress the progress bar in an R script on linux machine

Viewed 21

How can I supress the progress bar that shows up in the R console?

Im running a self written R function on a VM that runs on ubuntu. When my script does it's thing (which takes a while) the console output looks like this:

> a = my_function("name_of_a_directory")
|--------------------------------------------------|
|==================================================|

screenshot of console output in R via vscode

How can I get rid of it, since it clutters my console especially since it repeats if my function does it's thing for multiple files, so that it looks like this:

> a = my_function("name_of_a_directory")
|--------------------------------------------------|
|==================================================|
|--------------------------------------------------|
|==================================================|
|--------------------------------------------------|
|==================================================|
|--------------------------------------------------|
|==================================================|
|--------------------------------------------------|
|==================================================|
|--------------------------------------------------|
|==================================================|

If I run my script locally on a windows machine the progress bar does not show up so I guess it has something to do with that.

EDIT: thanks to @r2evans comment the issue was fixed. In freads documentation you find showProgress TRUE displays progress on the console if the ETA is greater than 3 seconds. It is produced in fread's C code where the very nice (but R level) txtProgressBar and tkProgressBar are not easily available.

0 Answers
Related