title: specifying a regression in R with an indicator variable
body: <p>I would like to specify a regression in R that would estimate coefficients on <code>x</code> that are conditional on a third variable, <code>z</code>, being greater than 0.  For example</p>
  
  <pre><code>y ~ a + x*1(z&gt;0) + x*1(z&lt;=0)
  </code></pre>
  
  <p>What is the correct way to do this in R using formulas?</p>