title: R: recover function call from an object
body: <pre><code>ctl &lt;- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
  trt &lt;- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
  group &lt;- gl(2, 10, 20, labels = c("Ctl","Trt"))
  weight &lt;- c(ctl, trt)
  lm.D9 &lt;- lm(weight ~ group)
  lm.D90 &lt;- lm(weight ~ group - 1) # omitting intercept
  
  &gt; lm.D90
  
  Call:
  lm(formula = weight ~ group)
  
  Coefficients:
    (Intercept)     groupTrt  
        5.032       -0.371 
  </code></pre>
  
  <p>I have a <code>lm</code> function here, and if I simply look at the object, <code>lm.D90</code>, I can see the exact call I used, which is <code>lm(formula = weight ~ group)</code>. Currently I have some objects whose calls I would like to recover. Is there a generic function in R that returns the call from which the object was obtained?</p>