title: R: ggplot: plot shows vertical lines instead of time course
body: <p>I am trying to get a simple plot showing the time course of worry duration over 6 days for two groups. However, I get vertical lines instead of a line showing the time course.</p>
  
  <p>This is what my data looks like:</p>
  
  <pre><code>&gt; head(alldays_dur)
              ParticipantID  Session     Day   Time    Worry_duration   group
  1              1              2         1     71804      15     intervention
  2              1              4         1     56095      5      intervention
  3              2              2         1     36739      15     intervention
  4              2              4         1     45013      10     intervention
  5              2              5         1     51026      5      intervention
  </code></pre>
  
  <p>This is the structure of my data</p>
  
  <pre><code>&gt; str(alldays_dur)
  'data.frame':   2620 obs. of  10 variables:
   $ ParticipantID : num  113 113 113 113 113 113 113 113 113 113 ...
   $ Session       : num  9 10 11 12 14 15 16 21 22 24 ...
   $ Day           : Factor w/ 6 levels "1","2","3","4",..: 2 2 2 2 2 2 2 3 3 
   $ Time          : num  37350 42862 47952 51555 61499 ...
   $ Worry_duration: num  5 5 5 5 10 0 5 5 5 5 ...
   $ group         : Factor w/ 2 levels "Intervention group",..: 1 1 1 1 1 1 
  </code></pre>
  
  <p>I have tried the following code:</p>
  
  <pre><code>p &lt;- ggplot(alldays_dur, aes(x=Day, y=Worry_duration, group=1)) +
      geom_line() +
      labs(x = "Day", 
      y = "Mean worry duration in minutes per day")
  print(p)
  </code></pre>
  
  <p>However, I get the following plot: <a href="http://i.stack.imgur.com/6Bkkv.png" rel="nofollow">plot</a></p>
  
  <p>I have included the group=1 in the code after reading some earlier posts on this topic. However, it didn't help me as I had hoped. 
  Do you maybe have some useful tips for me? Thank you in advance. </p>
  
  <p>Ps. I am sorry if the post is unclear in any way, this is my first time ever posting on stackoverflow, so I am not quite familiar with all the 'post-options' yet.</p>