title: Setting different linetypes in geom_smooth, ggplot2
body: <p>I am trying to set up a plot for a multiple regression model for data that look like this:</p>
  
  <pre><code>subject iq      condition RT
  1       98      A         312
  1       98      B         354
  1       98      C         432
  2       102     A         134
  2       102     B         542
  2       102     C         621
  ...     ...     ...       ...
  </code></pre>
  
  <p>and so on.</p>
  
  <p>I would like to plot iq on the x-axis, RT on the y-axis, and use differently coloured lines with different linetypes (dashed, dotted, e.g.) for the different conditions.</p>
  
  <p>Thus far, my code looks like this:</p>
  
  <pre><code>ggplot(DFplotlong, aes(iq, RT, colour = condition)) 
  + geom_smooth(method = lm, fullrange = TRUE, alpha = .15) 
  + theme_bw() 
  + labs(x = "iq", y = "reaction times") 
  + scale_colour_manual(values=c("#999999","#000000"), name="condition", breaks=c("A", "B", "C"), labels = c("easy", "medium", "hard"))
  </code></pre>
  
  <p>Now, in addition I think I somehow need to set linetype, but I do not know whether to use scale_linetype_manual, scale_linetype_discrete, or whatever. Also, I would not know how to use the correct function.</p>
  
  <p>Could anyone help me out on this one? That would be nice!</p>
  
  <p>Ps: I have tried various things, but either R gives me a plot in which the colours are specified as intended, but linetypes do not change, but stay solid, or it gives me error messages such as</p>
  
  <pre><code>Fehler in grid.Call.graphics(L_polygon, x$x, x$y, index) : 
  ungültiger Linientyp: muss Länge 2, 4, 6, oder 8 haben
  </code></pre>
  
  <p>which I guess in English should be something like</p>
  
  <pre><code>Error in grid.Call.graphics(L_polygon, x$x, x$y, index) :
  invalid linetype: must be length 2, 4, 6, or 8
  </code></pre>