title: Delta Timestamp Parsing in R (Nanoseconds, Microseconds, Milliseconds)
body: <p>I am working in R and need to change the timestamp from what I believe is nanosecond precision to either microsecond precision or millisecond precision (I believe it needs to be milliseconds or only three digits past the decimal). </p>
  
  <p><a href="https://i.stack.imgur.com/PCE62.png" rel="nofollow noreferrer">Example of two of the timestamps</a></p>
  
  <pre><code>"2019-03-02D00:00:12.214841000"
  </code></pre>
  
  <p>Part of the difficulty is I don't think there is a package like <code>lubridate</code> to handle it. I'm not sure if I need to use a regular expression to extract the seconds and then transform the nanoseconds to milliseconds. I'm open to any suggestions. </p>
  
  <p>Also, how do you recommend dealing with the <code>D</code>? I was thinking I should use <code>gsub("D", "-", df$timestamp)</code> and maybe then a package like <code>lubridate</code> could parse the timestamp even with the nanosecond precision?</p>