Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you will have better luck with <a href="https://github.com/hadley/lubridate" rel="nofollow">lubridate</a>:</p> <p>From <a href="http://vita.had.co.nz/papers/lubridate.pdf" rel="nofollow">Dates and Times Made Easy with lubridate</a>:</p> <blockquote> <p>5.3. Durations</p> <p>...</p> <p>The length of a duration is invariant to leap years, leap seconds, and daylight savings time because durations are measured in seconds. Hence, durations have consistent lengths and can be easily compared to other durations. Durations are the appropriate object to use when comparing time based attributes, such as speeds, rates, and lifetimes. lubridate uses the difftime class from base R for durations. Additional difftime methods have been created to facilitate this.</p> <p>lubridate uses the difftime class from base R for durations. Additional difftime methods have been created to facilitate this.</p> <p>...</p> <p>Duration objects can be easily created with the helper functions dyears(), dweeks(), ddays(), dhours(), dminutes(), and dseconds(). The d in the title stands for duration and distinguishes these objects from period objects, which are discussed in Section 5.4. Each object creates a duration in seconds using the estimated relationships given above.</p> </blockquote> <p>That said, I haven't (yet) found a function to parse a string into a duration.</p> <hr> <p>You might also take a look at <a href="http://chronic.rubyforge.org/" rel="nofollow">Ruby's Chronic</a> to see how elegant time parsing can be. I haven't found a library like this for R.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload