title: Optimization in R: constrOptim contraints
body: <p>I am used to working with the function <code>optim</code>, but this time I have a condition on one of my variables. I have three variables: <em>a</em>, <em>b</em>, and <em>d</em>. I don’t have any conditions on <em>a</em> or <em>b</em>, but <em>d</em> must be between 0 and 1: <code>0=&lt;d=&lt;1</code>.</p>
  
  <p>How can I do that?</p>