title: Error in adding multiple linear regression lines in ggplot
body: <p>I try to add my (multiple) linear regression lines on my ggplot.
  I have two dummies (morning-evening) for the morning.dummy.
  The plot is correct but it gives me an error when I want to add the regression lines.
  Here is the code:</p>
  
  <pre><code>regression_1 &lt;- lm(weight  ~ morning.dummy + dayNumber + (morning.dummy*dayNumber) + 
                       I(dayNumber^2) + (I(dayNumber^2)*morning.dummy),
                     data=weight_data)
  summary(regression_1)
  #plot
  plot2 &lt;- ggplot(data=weight_data,aes(x=dayNumber, y=weight, color=morning.dummy)) +
            geom_point()+
            stat_smooth(method = "lm", formula = weight  ~ morning.dummy + dayNumber + (morning.dummy*dayNumber) +I(dayNumber^2) + (I(dayNumber^2)*morning.dummy), size = 1) +
            labs(y = "Weight in kg", x = "Day Number of weight measurment", subtitle = "Day 0 = 3 October 2010")
  plot2
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
    non-finite location and/or size for viewport
  In addition: Warning message:
  Computation failed in `stat_smooth()`:
  object 'dayNumber' not found 
  </code></pre>
  
  <p>Does someone have an idea where I do something wrong?</p>