(v1.2.0.9021) only progressbar in interactive sessions

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2020-07-01 11:51:26 +02:00
1 parent cc6ce0a938
commit afc660dc33
13 files changed
+16 -16

No files matched your search

+1 -1
View File
@@ -411,7 +411,7 @@ font_stripstyle <- function(x) {
}
progress_estimated <- function(n = 1, n_min = 0, ...) {
if (n >= n_min) {
if (n >= n_min & interactive()) {
pb <- utils::txtProgressBar(max = n, style = 3)
pb$tick <- function() {
pb$up(pb$getVal() + 1)