title: ggvis line chart with interactive x axis range
body: <p>I'd like to be able to</p>
  
  <ol>
  <li>Plot a line chart in ggvis</li>
  <li>Add two interactive controls, which allow me to set the min and max x values on the chart</li>
  </ol>
  
  <p>This sounds pretty straightforward - my code is:</p>
  
  <pre><code>minx = minx = input_numeric(1, 'Min x-val')
  maxx = input_numeric(1, 'Max x-val')
  
  data.frame(train.dt) %&gt;% 
  ggvis(x = ~plot_idx, y = ~val) %&gt;%
  layer_lines() %&gt;% add_axis('x') %&gt;%
  scale_numeric('x', domain = c(minx, maxx), clamp = T)
  </code></pre>
  
  <p>However, this doesn't work. I get this error message:</p>
  
  <blockquote>
    <p>"Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] : non-numeric argument to binary operator". </p>
  </blockquote>
  
  <p>If I replace minx and maxx in the domain argument with e.g. 1 and 10, my graph plots just fine (but is static). Any ideas?</p>
  
  <p>Thanks!</p>