Skip to content

Commit

Permalink
import
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Nov 6, 2024
1 parent 87bc009 commit 5357993
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ importFrom(snow,sendCall)
importFrom(testthat,capture_messages)
importFrom(testthat,capture_output_lines)
importFrom(utils,capture.output)
importFrom(utils,flush.console)
importFrom(utils,head)
importFrom(utils,object.size)
importFrom(utils,packageVersion)
Expand Down
2 changes: 1 addition & 1 deletion R/PBA.R
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +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()
utils::flush.console()
}

if(!is.null(wait.time))
Expand Down
2 changes: 1 addition & 1 deletion R/RobbinsMonro.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ RobbinsMonro <- function(f, p, ...,
else
cat(sprintf("\rIter: %i; Max change in p = %.3f",
i, change))
flush.console()
utils::flush.console()
}
if(i > miniter && all(change < tol)){
k.succ <- k.succ + 1L
Expand Down
4 changes: 3 additions & 1 deletion R/SimSolve.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@
#' @return the filled-in \code{design} object containing the associated lower and upper interval
#' estimates from the stochastic optimization
#'
#' @importFrom utils flush.console
#'
#' @seealso \code{\link{SFA}}
#'
#' @export
Expand Down Expand Up @@ -629,7 +631,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()
utils::flush.console()
}
if(verbose) cat("\n")

Expand Down
2 changes: 1 addition & 1 deletion R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +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()
utils::flush.console()
invisible(NULL)
}

Expand Down
2 changes: 1 addition & 1 deletion man/SimFunctions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5357993

Please sign in to comment.