[R] A question about "txtProgressBar" function

From: Li, Yunfei <yunfei_li_at_wsu.edu>
Date: Fri, 08 Apr 2011 17:04:14 -0700


I tried to add a progress bar to my script, but it seems the "txtProgressBar" function will wipe out what I want to print before it(for example - the "Hello" in following script), and the parameters "title" and "label" do not work either. How can I put a title for the progress bar? or is there any other better function I can use?

testit <- function(total =20)

# create progress bar
pb <- txtProgressBar(min = 0, max = total, style = 3,title="ProgressBar1",label="ProgressBar2") for(i in 1:total){

   # update progress bar
   setTxtProgressBar(pb, i)




Yunfei Li

Research Assistant
Department of Statistics &
School of Molecular Biosciences
Biotechnology Life Sciences Building 427 Washington State University
Pullman, WA 99164-7520
Phone: 509-339-5096

        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 09 Apr 2011 - 03:56:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Apr 2011 - 19:50:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive