1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 09:11:51 +02:00

(v1.2.0.9021) only progressbar in interactive sessions

This commit is contained in:
2020-07-01 11:51:26 +02:00
parent cc6ce0a938
commit afc660dc33
13 changed files with 16 additions and 16 deletions

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)

View File

@ -124,7 +124,7 @@ ab_from_text <- function(text,
as.ab(NA)
} else {
if (!isFALSE(translate_ab)) {
out <- ab_property(out, property = translate_ab, initial = FALSE)
out <- ab_property(out, property = translate_ab, initial_search = FALSE)
}
out
}

View File

@ -327,7 +327,7 @@ key_antibiotics_equal <- function(y,
}
}
if (info_needed == TRUE) {
cat("\n")
close(p)
}
result
}