Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add day formatting #11

Merged
merged 1 commit into from
Sep 26, 2016
Merged

Add day formatting #11

merged 1 commit into from
Sep 26, 2016

Conversation

philchalmers
Copy link
Contributor

I would like to add pbapply as a dependency to one of my packages (specifically after the a version which supports parallel computations is released to CRAN). However, I was wondering if you could add a days formatting to the progress output. Some of my apply statements could take days to finish, therefore I would prefer to print the number of days and hours instead of just the hours alone.

The following pull request gives this type of output:

> getTimeAsString(60)
[1] "01m 00s"
> getTimeAsString(60 * 60)
[1] "01h 00m 00s"
> getTimeAsString(60 * 60 * 24)
[1] "01d 00h 00m 00s"
> getTimeAsString(60 * 60 * 24 * 4)
[1] "04d 00h 00m 00s"
> getTimeAsString(60 * 60 * 24 * 4 + 1)
[1] "04d 00h 00m 01s"

@psolymos psolymos merged commit 3440607 into psolymos:master Sep 26, 2016
@psolymos
Copy link
Owner

Thanks @philchalmers , this looks like a useful extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants