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

wrong example in man / hms.Rd #272

stepds opened this issue Oct 26, 2014 · 1 comment

wrong example in man / hms.Rd #272

stepds opened this issue Oct 26, 2014 · 1 comment


Copy link

@stepds stepds commented Oct 26, 2014

This example in man/hms.Rd

x <- c("09:10:01", "09:10:02", "09:10:03", "Collided at 9:20:04 pm")
# [1] 9 hours, 10 minutes and 1 second
# [2] 9 hours, 10 minutes and 2 seconds
# [3] 9 hours, 10 minutes and 3 seconds

lacks the last output line. AND if you run the example you will get "9 hours, 20 minutes and 4 seconds" for the missing element. However, the example is quite MISLEADING, due to the presence of "pm" in the last element. One would think that hms() should return "21 hours..." for that element instead of "9 hours..."

@vspinu vspinu closed this in 0a20213 Oct 26, 2014
Copy link

@vspinu vspinu commented Oct 26, 2014

Thanks for pointing the omission; hms returns a period and parses the numbers as is, regardless of the semantic meaning of the sentence (an instance in the example). I have changed this example into a more intuitive "Finished in 9 hours, 20 min and 4 seconds".


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants