title: R sequence in subset
body: <p>I've got a data frame looking like this:</p>
  
  <pre><code>in    out
  3234  1
  124   1
  323   0
  532   1
  </code></pre>
  
  <p>Now I'd like to make a plot of <code>mean(subset(data, data$in &lt; x)$out)</code>. 
  I attempt to generate a sequence for plotting like this:</p>
  
  <pre><code>x &lt;- seq(0, 10000, by=1)
  y &lt;- mean(subset(data, data$in &lt; x)$out)
  </code></pre>
  
  <p>But the second line gives me a warning "longer object length is not a multiple of shorter object length" and <code>plot(x, y)</code> results in an error. Meanwhile, if I put a number instead of <code>x</code> it works. Can anyone point out what's the problem with such approach?</p>