Skip to content

Commit

Permalink
flush
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Nov 5, 2024
1 parent c19907c commit 87bc009
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions R/PBA.R
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ PBA <- function(f, interval, ..., p = .6,
cat(sprintf(paste0('; k.tol = %i; Pred = %',
if(integer) ".1f" else ".3f"),
k.successes, glmpred0[1L]))
flush.console()
}

if(!is.null(wait.time))
Expand Down
1 change: 1 addition & 0 deletions R/RobbinsMonro.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ RobbinsMonro <- function(f, p, ...,
else
cat(sprintf("\rIter: %i; Max change in p = %.3f",
i, change))
flush.console()
}
if(i > miniter && all(change < tol)){
k.succ <- k.succ + 1L
Expand Down
2 changes: 2 additions & 0 deletions R/SimSolve.R
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ SimSolve <- function(design, interval, b, generate, analyse, summarise,
if(i > 1L) cat("\n")
cat(sprintf('\n#############\nDesign row %s:\n\n', i))
print(cbind(as.data.frame(design[i,]), b = b))
flush.console()
}
if(verbose) cat("\n")

Expand Down Expand Up @@ -697,6 +698,7 @@ SimSolve <- function(design, interval, b, generate, analyse, summarise,
cat(sprintf(paste0("\nSolution for %s: %", if(integer) ".1f" else ".3f"),
colnames(design)[which(is.na(tmp))], roots[[i]]$root))
if(verbose && i == nrow(design)) cat("\n\n")
flush.console()
}
if(save && i < nrow(design)) saveRDS(roots, tmpfilename)
}
Expand Down
1 change: 1 addition & 0 deletions R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ print_progress <- function(row, trow, stored_time, RAM, progress,
row, trow, replications, RAM, timeFormater_internal(sum(stored_time))))
cat(sprintf('\n Conditions: %s\n', condstring))
if(progress) cat('\r')
flush.console()
invisible(NULL)
}

Expand Down

0 comments on commit 87bc009

Please sign in to comment.