title: Constrained least squares
body: <p>I am fitting a simple regression in R on gas usage per capita. The regression formulas looks like:</p>
  
  <pre><code>gas_b &lt;- lm(log(gasq_pop) ~ log(gasp) + log(pcincome) + log(pn) +
              log(pd) + log(ps) + log(years), 
              data=gas)
  summary(gas_b)
  </code></pre>
  
  <p>I want to include a linear constraint that the beta coefficients of <code>log(pn)+log(pd)+log(ps)=1</code> (sum to one).  Is there a simple way of implementing this (possibly in the <code>lm</code> function) in R without having to use <code>constrOptim()</code> function?</p>