title: error: 'object not found' in nested functions
body: <p>I was writing a function using the <code>logistf::logistf</code> and <code>logistf::forward</code> function. I will give here a minimum working example using <code>sex2</code> from the <code>logistf</code> package.</p>
  <pre><code>data(sex2)
  fwSel &lt;- function(datamod) {
    fitnull &lt;- logistf(case ~ 1, data = datamod, pl = FALSE) 
    fw &lt;- forward(fitnull)
    return(fw)
  }
  fwSel(sex2)
  </code></pre>
  <p>I get the following output:</p>
  <blockquote>
  <p>Step  0 : starting model</p>
  <p>Error in is.data.frame(data) : object 'datamod' not found`.</p>
  </blockquote>
  <p>Has anybody an explanation for that?</p>