title: lubridate: how to convert difftime to millisecond units (and plot it)?
body: <p>Consider the following example</p>
  
  <pre><code>time = c('2013-01-03 22:04:21.549', '2013-01-03 22:04:21.549', '2013-01-03 22:04:21.559', '2013-01-03 22:04:23.559' )
  ref = c('2013-01-03 22:04:20', '2013-01-03 22:04:20', '2013-01-03 22:04:20', '2013-01-03 22:04:20')
  value = c(1,2,3,4)
  
  
  data &lt;- data_frame(time, ref, value)
  data &lt;-data %&gt;%  mutate(time = ymd_hms(time),
                          ref = ymd_hms(ref),
                          difftime = time - ref)
  
  # A tibble: 4 × 4
                   time                 ref value   difftime
                 &lt;dttm&gt;              &lt;dttm&gt; &lt;dbl&gt;     &lt;time&gt;
  1 2013-01-03 22:04:21 2013-01-03 22:04:20     1 1.549 secs
  2 2013-01-03 22:04:21 2013-01-03 22:04:20     2 1.549 secs
  3 2013-01-03 22:04:21 2013-01-03 22:04:20     3 1.559 secs
  4 2013-01-03 22:04:23 2013-01-03 22:04:20     4 3.559 secs
  </code></pre>
  
  <p>I would like to get a scatterplot of <code>value</code> and <code>difftime</code> where the units of <code>difftime</code> are in <strong>milliseconds</strong>. </p>
  
  <p>I dont know how to do that. The best I could do is the following:</p>
  
  <pre><code>ggplot(data, aes(x = value, y = difftime )) + geom_point() 
  
  Don't know how to automatically pick scale for object of type difftime. Defaulting to continuous.
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xODf4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xODf4.png" alt="enter image description here"></a></p>
  
  <p>but that keeps the seconds representation. </p>
  
  <p>Any ideas? 
  Thanks!!</p>