ursaProgressBar | R Documentation |
Informative progress bars with dispaying elapsed and remained time.
ursaProgressBar(kind = c("tk", "txt"),title = .argv0(),
label = "", min = 0, max = 1, initial = min, width = NA,
style = 1, tail = FALSE, silent = FALSE)
setUrsaProgressBar(pb, value, title = NULL, label = NULL)
## S3 method for class 'ursaProgressBar'
close(con, ...)
kind |
Character. Type or progress bar. Valid values are |
style |
See description for the same argument in |
width |
See description for the same argument in |
title , label , min , max , initial , value , pb |
See description for the same arguments in |
con , ... |
See description for the same arguments in |
tail |
Logical. Behaviour of progress bar appearing. If |
silent |
Logical. If |
Wrapper to one of
txtProgressBar
,
tkProgressBar
.
Visualization of progress bar is updates each 0.5 seconds, it is effective for multiple short-term iterations.
Progress bars should be closed by calling of appropriate method of generic function close
depending of class of reference progress bar.
ursaProgressBar
returns object of reference progress bar.
Function name in style camelCase for consistence with other progress bar functions in R.
Nikita Platonov platonov@sevin.ru
txtProgressBar
tkProgressBar
session_grid(NULL)
n1 <- 3
n2 <- 83
p <- 0.0011
#require(tcltk)
pb <- ursaProgressBar(min=0,max=n1,title="first",tail=TRUE)
for (i in seq(n1)) {
pb2 <- ursaProgressBar(min=0,max=n2,title="second")
for (i in seq(n2)) {
setUrsaProgressBar(pb2)
Sys.sleep(p)
}
close(pb2)
setUrsaProgressBar(pb)
}
close(pb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.