R/set-progress.R

Defines functions .set_progress

# Generated by autofun (0.0.0.9000): do not edit by hand!!!
# Please edit source code in spsann-package/R-autofun/set-progress.R
.set_progress<-function(...){
expression(if (!is.null(progress)) {
  max <- n_pts * schedule$chains * schedule$chain.length
  if (progress == "txt") {
    pb <- utils::txtProgressBar(min = 1, max = max, style = 3)
  } else {
    if (progress == "tk") {

      # Check suggests
      pkg <- c("tcltk")
      eval(.check_suggests())

      label <- paste(objective, " with ", n_pts, " points", sep = "")
      pb <- tcltk::tkProgressBar(label = label, min = 1, max = max)
    }
  }
}, time0 <- proc.time())
}
samuel-rosa/spsann documentation built on Nov. 6, 2023, 12:48 p.m.