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

Closed
stepds opened this issue Oct 26, 2014 · 1 comment
Closed

wrong example in man / hms.Rd #272

stepds opened this issue Oct 26, 2014 · 1 comment

Comments

@stepds
Copy link

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")
hms(x)
# [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 as completed in 0a20213 Oct 26, 2014
@vspinu
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants