Skip to content
Browse files

Make progress bar examples take less time

  • Loading branch information...
1 parent 10de85b commit dff5ca59e69a44a83e6939a4794bb5d12a86035e @hadley committed
Showing with 14 additions and 14 deletions.
  1. +7 −7 R/progress.r
  2. +2 −2 man/progress_text.Rd
  3. +3 −3 man/progress_tk.Rd
  4. +2 −2 man/progress_win.Rd
View
14 R/progress.r
@@ -69,8 +69,8 @@ progress_none <- function() {
#' @param ... other arugments passed on to \code{\link{txtProgressBar}}
#' @export
#' @examples
-#' l_ply(1:1000, identity, .progress = "text")
-#' l_ply(1:1000, identity, .progress = progress_text(char = "-"))
+#' l_ply(1:100, identity, .progress = "text")
+#' l_ply(1:100, identity, .progress = progress_text(char = "-"))
progress_text <- function(style = 3, ...) {
n <- 0
txt <- NULL
@@ -99,9 +99,9 @@ progress_text <- function(style = 3, ...) {
#' @seealso \code{\link[tcltk]{tkProgressBar}} for the function that powers this progress bar
#' @export
#' @examples
-#' l_ply(1:1000, identity, .progress = "tk")
-#' l_ply(1:1000, identity, .progress = progress_tk(width=400))
-#' l_ply(1:1000, identity, .progress = progress_tk(label=""))
+#' l_ply(1:100, identity, .progress = "tk")
+#' l_ply(1:100, identity, .progress = progress_tk(width=400))
+#' l_ply(1:100, identity, .progress = progress_tk(label=""))
progress_tk <- function(title = "plyr progress", label = "Working...", ...) {
stopifnot(require("tcltk", quiet=TRUE))
n <- 0
@@ -131,8 +131,8 @@ progress_tk <- function(title = "plyr progress", label = "Working...", ...) {
#' @export
#' @examples
#' if(exists("winProgressBar")) {
-#' l_ply(1:1000, identity, .progress = "win")
-#' l_ply(1:1000, identity, .progress = progress_win(title="Working..."))
+#' l_ply(1:100, identity, .progress = "win")
+#' l_ply(1:100, identity, .progress = progress_win(title="Working..."))
#' }
progress_win <- function(title = "plyr progress", ...) {
n <- 0
View
4 man/progress_text.Rd
@@ -17,5 +17,5 @@
\item{style}{style of text bar, see Details section of \code{\link{txtProgressBar}}}
\item{...}{other arugments passed on to \code{\link{txtProgressBar}}}
}
-\examples{l_ply(1:1000, identity, .progress = "text")
-l_ply(1:1000, identity, .progress = progress_text(char = "-"))}
+\examples{l_ply(1:100, identity, .progress = "text")
+l_ply(1:100, identity, .progress = progress_text(char = "-"))}
View
6 man/progress_tk.Rd
@@ -17,6 +17,6 @@
\item{label}{progress bar label (inside window)}
\item{...}{other arguments passed on to \code{\link[tcltk]{tkProgressBar}}}
}
-\examples{l_ply(1:1000, identity, .progress = "tk")
-l_ply(1:1000, identity, .progress = progress_tk(width=400))
-l_ply(1:1000, identity, .progress = progress_tk(label=""))}
+\examples{l_ply(1:100, identity, .progress = "tk")
+l_ply(1:100, identity, .progress = progress_tk(width=400))
+l_ply(1:100, identity, .progress = progress_tk(label=""))}
View
4 man/progress_win.Rd
@@ -17,6 +17,6 @@
\item{...}{other arguments passed on to \code{winProgressBar}}
}
\examples{if(exists("winProgressBar")) {
-l_ply(1:1000, identity, .progress = "win")
-l_ply(1:1000, identity, .progress = progress_win(title="Working..."))
+l_ply(1:100, identity, .progress = "win")
+l_ply(1:100, identity, .progress = progress_win(title="Working..."))
}}

0 comments on commit dff5ca5

Please sign in to comment.
Something went wrong with that request. Please try again.