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

Duration in summary of data.frame #472

Closed
mauricewendt opened this Issue Sep 20, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@mauricewendt

mauricewendt commented Sep 20, 2016

I want to summary a data-frame with summary(videos), where videos$DURATION is the video-length in seconds.

I get the following error if the data.frame exceeds a non-determinable size:

Error in sprintf("%ds (~%s %ss)", x, x2, unit, "s)") : invalid format '%d'; use format %f, %e, %g or %a for numeric objects

The following Code reproduces the error, if you play around with the sample size:

set.seed(1)
videos <- data.frame(
DURATION = lubridate::duration(
sample(0:12345,10) # sample 10 different durations (e.g. 1000 produces an error)
)
)
summary(videos)

@vspinu

This comment has been minimized.

Member

vspinu commented Sep 21, 2016

Strangely enough I cannot reproduce it with your code, but it seems to be the same issues as #465. Should be fixed once I pulled that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment