title: Recalling an expression that was created via a sample
body: <p>When I want to view structures as they were called, I can usually do it with <code>enquote</code>.  </p>
  
  <p>For an arbitrary list <code>d</code> this would be</p>
  
  <pre><code>&gt; d &lt;- list(a = 1, b = 2)
  &gt; enquote(d)
  # quote(list(a = 1, b = 2))
  </code></pre>
  
  <p>But for an object created via a sample, it's different.  <code>sample</code> does not show up in the quoted call.</p>
  
  <pre><code>&gt; m &lt;- matrix(sample(2))
  &gt; enquote(m)
  # quote(c(2L, 1L))
  </code></pre>
  
  <p>Is there a way to show the call/expression that created <code>m</code>, so that <code>sample</code> shows up? So that the result would be something like </p>
  
  <pre><code>quote(matrix(sample(2))
  </code></pre>
  
  <hr>
  
  <p><strong>Update:</strong> Simon's answer below is great, but I'd really like to see if I can get an answer that doesn't require I use <code>substitute</code> to create the matrix <code>m</code>.</p>