search for: settxtprogressbar

Displaying 15 results from an estimated 15 matches for "settxtprogressbar".

2011 Apr 09
2
A question about "txtProgressBar" function
...better function I can use? testit <- function(total =20) { cat("Hello\n") # create progress bar pb <- txtProgressBar(min = 0, max = total, style = 3,title="ProgressBar1",label="ProgressBar2") for(i in 1:total){ Sys.sleep(0.1) # update progress bar setTxtProgressBar(pb, i) } close(pb) } testit() Best, Yunfei Li -------------------------------------------------------------------------------------- Research Assistant Department of Statistics & School of Molecular Biosciences Biotechnology Life Sciences Building 427 Washington State University Pullman,...
2013 Jun 19
2
Barra de progreso
...s] Barra de progreso # Fuente: http://ryouready.wordpress.com/2009/03/16/r-monitor-function-progress-with-a-progress-bar/ library(utils) total <- 20 # create progress bar pb <- txtProgressBar(min = 0, max = total, style = 3) for(i in 1:total){    Sys.sleep(0.1)    # update progress bar    setTxtProgressBar(pb, i) } close(pb) library(tcltk) total <- 20 # create progress bar pb <- tkProgressBar(title = "progress bar", min = 0,                     max = total, width = 300) for(i in 1:total){    Sys.sleep(0.1)    setTkProgressBar(pb, i, label=paste( round(i/total*100, 0),              ...
2012 Jul 22
2
Reading many large files causes R to crash - Possible Bug in R 2.15.1 64-bit Ubuntu
...g data at open, set close to NA valsToChange <- which(dat.i[,"Open"] == -1) if (length(valsToChange) != 0) { dat.i[valsToChange, "Close"] <- NA } if(i == 1) { DAT = fun(dat.i) } else { DAT = merge(DAT,fun(dat.i)) } setTxtProgressBar(pb, i) } close(pb) colnames(DAT) = tickerNames return(DAT) } parseTickData <- function(inputFile) { DAT.list <- scan(file=inputFile, sep=",",skip=1,what=list(Date="",Time="",Close=0,Volume=0),quiet=T) index <- as.POSIXct(paste(DAT.list$D...
2013 Jun 18
3
Barra de progreso
Buenas tardes: ¿Cuál es el modo más adecuado de incorporar una barra de progreso en la ventana de comandos?. Es para acompañar a un proceso de lectura de ficheros de datos... Necesitaba que la solución fuese multiplataforma. Gracias. Un saludo. Eva [[alternative HTML version deleted]]
2016 Dec 07
3
Strange behavior when using progress bar (Fwd: Re: [R] The code itself disappears after starting to execute the for loop)
...ress bar is used in a much >> slower function, the console is cleared every 2-3 iteration, which >> means that I cannot scroll back to check the output. testit <- function(x = sort(runif(20)), ...) { pb <- txtProgressBar(...) for(i in c(0, x, 1)) {Sys.sleep(0.2); setTxtProgressBar(pb, i)} Sys.sleep(1) close(pb) } it <- 0 while (TRUE) {testit(style = 3); it <- it + 1; print(paste("done", it))} >> Is this only a problem for a few, or is it reproducible? Any hints to >> what the problem could be, or if it can be fixed? I have seen...
2013 Jun 20
1
Barra de progreso
...tp://ryouready.wordpress.com/2009/03/16/r-monitor-function-progress-with-a-progress-bar/ > >library(utils) >total <- 20 ># create progress bar >pb <- txtProgressBar(min = 0, max = total, style = 3) >for(i in 1:total){ >   Sys.sleep(0.1) >   # update progress bar >   setTxtProgressBar(pb, i) >} >close(pb) > >library(tcltk) >total <- 20 ># create progress bar >pb <- tkProgressBar(title = "progress bar", min = 0, >                    max = total, width = 300) > >for(i in 1:total){ >   Sys.sleep(0.1) >   setTkProgressBar(pb, i, la...
2016 Nov 28
2
Strange behavior when using progress bar (Fwd: Re: [R] The code itself disappears after starting to execute the for loop)
...pplication, where the progress bar is used in a much slower function, the console is cleared every 2-3 iteration, which means that I cannot scroll back to check the output. testit <- function(x = sort(runif(20)), ...) { pb <- txtProgressBar(...) for(i in c(0, x, 1)) {Sys.sleep(0.2); setTxtProgressBar(pb, i)} Sys.sleep(1) close(pb) } iter = 0 while (TRUE) {testit(style = 3); iter = iter + 1; print(paste("done", iter))} Is this only a problem for a few, or is it reproducible? Any hints to what the problem could be, or if it can be fixed? I have seen this in some versions of R,...
2011 Feb 14
2
txtProgressBar examples?
Dear R users, I am curious if someone could direct me towards websites/tutorials for uses of progress bars (especially) in R. I can't seem to figure them out. Thanks very much, Scott [[alternative HTML version deleted]]
2013 Jun 18
0
Barra de progreso
# Fuente: http://ryouready.wordpress.com/2009/03/16/r-monitor-function-progress-with-a-progress-bar/ library(utils) total <- 20 # create progress bar pb <- txtProgressBar(min = 0, max = total, style = 3) for(i in 1:total){ Sys.sleep(0.1) # update progress bar setTxtProgressBar(pb, i) } close(pb) library(tcltk) total <- 20 # create progress bar pb <- tkProgressBar(title = "progress bar", min = 0, max = total, width = 300) for(i in 1:total){ Sys.sleep(0.1) setTkProgressBar(pb, i, label=paste( round(i/total*100, 0),...
2009 Nov 09
1
Quickly generate all possible combinations of 2 groups
...ry(combinat) n=20 #number of data points in the data set start=proc.time()[3] #start a timer pb = txtProgressBar(max=n+1,style=3) #initialize a progress bar for(i in 0:n){ #for each possible size of set1 Set1 = combn(1:n,i) #get set1 combinations Set2 = rev(combn(1:n,n-i)) #get set2 combinations setTxtProgressBar(pb,i+1) #increment the progress bar } close(pb) #close the progress bar proc.time()[3]-start #show the time taken (about 40s @ 2.2GHz) ######## However, this obviously ends up being too slow when the number of data points rises much above 20 (I'll likely be dealing with data sets to a maximum...
2013 Jun 19
0
Barra de progreso
...uready.wordpress.com/2009/03/16/r-monitor-function-progress-with-a-progress-bar/ > > library(utils) > total <- 20 > # create progress bar > pb <- txtProgressBar(min = 0, max = total, style = 3) > for(i in 1:total){ > Sys.sleep(0.1) > # update progress bar > setTxtProgressBar(pb, i) > } > close(pb) > > library(tcltk) > total <- 20 > # create progress bar > pb <- tkProgressBar(title = "progress bar", min = 0, > max = total, width = 300) > > for(i in 1:total){ > Sys.sleep(0.1) > setTkProgressBar...
2010 Apr 05
2
Rprintf not updating
Hello all, I am using Rprintf in a C for loop (from .Call) to print a progress indicator showing the current percent complete. The loop I am doing is an time intensive call to another function. I have noticed that Rprintf does not print to the R-window until the entire loop has been completed. When it reaches the end of the loop it suddenly prints 0 percent to 100 percent in a split second.
2016 Dec 07
0
Strange behavior when using progress bar (Fwd: Re: [R] The code itself disappears after starting to execute the for loop)
...gt; >> slower function, the console is cleared every 2-3 iteration, which > >> means that I cannot scroll back to check the output. > > testit <- function(x = sort(runif(20)), ...) { > pb <- txtProgressBar(...) > for(i in c(0, x, 1)) {Sys.sleep(0.2); setTxtProgressBar(pb, i)} > Sys.sleep(1) > close(pb) > } > > it <- 0 > while (TRUE) {testit(style = 3); it <- it + 1; print(paste("done", it))} > > >> Is this only a problem for a few, or is it reproducible? Any hints to > >> what the problem...
2016 Dec 07
0
Strange behavior when using progress bar (Fwd: Re: [R] The code itself disappears after starting to execute the for loop)
...s used in a much > slower function, the console is cleared every 2-3 iteration, which > means that I cannot scroll back to check the output. > > > testit <- function(x = sort(runif(20)), ...) > { > pb <- txtProgressBar(...) > for(i in c(0, x, 1)) {Sys.sleep(0.2); setTxtProgressBar(pb, i)} > Sys.sleep(1) > close(pb) > } > > iter = 0 > while (TRUE) {testit(style = 3); iter = iter + 1; print(paste("done", > iter))} > > Is this only a problem for a few, or is it reproducible? Any hints to > what the problem could be, or if it can be f...
2024 Mar 25
3
Wish: a way to track progress of parallel operations
Hello, thanks for bringing this topic up, and it would be excellent if we could come of with a generic solution for this in base R. It is one of the top frequently asked questions and requested features in parallel processing, but also in sequential processing. We have also seen lots of variants on how to attack the problem of reporting on progress when running in parallel. As the author