title: Making a trajectory plot using R
body: <p>I want to make a trajectory plot of my data set, like a scatterplot of X,Y but the data points are connected with a line using an arrow (where the arrow points to the next position)</p>
  
  <p>My data looks like this:</p>
  
  <pre><code>A    T   X     Y      V      GD  ND   ND2 TID
  1 1 3.88 2.7 675.0 27.000  27.000  NA    NA  t1
  2 1 3.92 2.7 677.7 42.691  69.691 2.7  7.29  t1
  3 1 3.96 2.7 675.0 55.662 125.353 0.0  0.00  t1
  4 1 4.00 2.7 675.0 55.662 181.015 0.0  0.00  t1
  5 1 4.04 2.7 675.0 55.662 236.677 0.0  0.00  t1
  6 1 4.08 2.7 680.4 42.691 279.368 5.4 29.16  t1
  </code></pre>
  
  <p>And I have tried using qplot to make it:</p>
  
  <pre><code>qplot(X, Y, data = sub.data1, color = TID, group = TID)+ 
    geom_line(linetype=5, size=1.5, arrow=arrow(angle=15, ends="both", type="closed"))+
    geom_point (shape=19, size=5, fill="black")
  </code></pre>
  
  <p>This was okay, it worked. Just that I wanted to make the points in my plot arrows that are pointing in the next data point.
  Any help would be great!
  Thanks!</p>