title: get name of an object inside a loop
body: <p>I know the deparse+substitute trick to get the name from an object passed as argument to a function, but the same trick inside a loop does no work.</p>
  
  <p>My code (just for testing):</p>
  
  <pre><code>mylist &lt;- list(first = c("lawyer","janitor"), second = c("engineer","housewife"))
  
  for (element in names(mylist)){
    print(deparse(substitute(mylist[[element]])))
  }
  
  [1] "mylist[[element]]"
  [1] "mylist[[element]]"
  </code></pre>
  
  <p>is there any way of getting the result?:</p>
  
  <pre><code>first
  second
  </code></pre>