title: Convert proprietary time duration format to milliseconds
body: <p>Here is an example of the time duration format:</p>
  
  <pre><code>16984  = 16 second 984 milliseconds
  214032 = 2 minutes 14 seconds, 032 milliseconds
  1649871 = 16 minutes 49 seconds and 871 milliseconds
  </code></pre>
  
  <p>So it looks like the time duration format in human readable format is <code>minutes:seconds:milliseconds</code></p>
  
  <p>I wrote a function to convert it but I know its not foolproof.  I know that the length of the string will be up to 2</p>
  
  <pre><code>convert.to.ms &lt;- function(str) {
  
    str &lt;- as.numeric(str)
  
    ms &lt;- c()
    ss &lt;- c()
    min &lt;- c()
    nchar(str)
    total.ms &lt;-c()
  
    if(nchar(str) == 6) {
  
      ms  &lt;- as.numeric(substr(str, nchar(str)-2, nchar(str)))
  
      ss  &lt;- as.numeric(substr(str, nchar(str)-4, nchar(str)-3))
  
      min &lt;- as.numeric(substr(str, 0, 1))
      total.ms &lt;- (sum (ms + ss*1000 + min*60000))
  
  
    } else if(nchar(str) == 5) {
  
      ms  &lt;- as.numeric(substr(str, nchar(str)-2, nchar(str)))
  
      ss  &lt;- as.numeric(substr(str, nchar(str)-4, nchar(str)-3))
      total.ms &lt;- (sum (ms + ss*1000))
    }
    total.ms
  }
  </code></pre>
  
  <p>I've tried using <code>lubridate</code> to no avail</p>