Skip to content

Commit

Permalink
adjust date before release
Browse files Browse the repository at this point in the history
  • Loading branch information
psolymos committed Jan 10, 2018
1 parent fb58d9b commit ee0d4d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: pbapply
Type: Package
Title: Adding Progress Bar to '*apply' Functions
Version: 1.3-4
Date: 2017-08-07
Date: 2018-01-09
Author: Peter Solymos [aut, cre], Zygmunt Zawadzki [aut]
Maintainer: Peter Solymos <[email protected]>
Description: A lightweight package that adds
Expand Down
5 changes: 2 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# User-visible changes in the pbapply R package

## Version 1.3-4, August 7, 2017
## Version 1.3-4, January 9, 2018

* New function `pbtypes()` to print available pb types
depending on OS.
* New function `pbtypes()` to print available pb types depending on OS.
* `getTimeAsString` is now exported, with description and examples.
* New `pboption` `use_lb` to switch on load balancing for parallel clusters,
`FALSE` by default (feature request #28).
Expand Down
9 changes: 6 additions & 3 deletions man/pboptions.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,15 @@ Progress bars used in the functions:
\code{\link[tcltk]{tkProgressBar}}
}
\examples{
## increase sluggishness to admire the progress bar longer
sluggishness <- 0.01

## for loop
fun1 <- function() {
pb <- startpb(0, 10)
on.exit(closepb(pb))
for (i in 1:10) {
Sys.sleep(0.15)
Sys.sleep(sluggishness)
setpb(pb, i)
}
invisible(NULL)
Expand All @@ -135,7 +138,7 @@ fun2 <- function() {
on.exit(closepb(pb))
i <- 1
while (i < 10) {
Sys.sleep(0.15)
Sys.sleep(sluggishness)
setpb(pb, i)
i <- i + 1
}
Expand All @@ -157,7 +160,7 @@ fun1()

## dealing with nested progress bars
## when only one the 1st one is needed
f <- function(x) Sys.sleep(0.01)
f <- function(x) Sys.sleep(sluggishness)
g <- function(x) pblapply(1:10, f)
tmp <- lapply(1:10, g) # undesirable
## here is the desirable solution
Expand Down

0 comments on commit ee0d4d0

Please sign in to comment.