title: When is R's assign() function appropriate?
body: <p>I often see questions from novice R programmers where they've used <code>assign</code> to create multiple objects, and then run into trouble trying to manipulate those objects for a subsequent task (<a href="https://stackoverflow.com/questions/54063575/bind-tables-in-a-loop-in-r/">a recent example</a>).</p>
  
  <p><code>assign</code> appeals to novice users because it has dynamic properties (programmatically creating variable names, in addition to the variable's values), and seems to mimic some properties of global assignment. Its straightforward name also makes it likely to show up in searches for a variety of problem types. </p>
  
  <p>Of course, more experienced R programmers come to realize that <code>assign</code> creates code that is hard to read, fragile to maintain, and acts via the type of side effects that are otherwise staunchly avoided in the highly functional R language. </p>
  
  <p>Every question I've seen on SO where the OP initially used <code>assign</code> ultimately has a better alternative in the correct use of named vectors, lists, or data frames. The resulting code is easier to follow, more robust to change, and often more performant. </p>
  
  <p>All this is to say, it's easy to find examples of <a href="https://stackoverflow.com/questions/17559390/why-is-using-assign-bad">why <code>assign</code> is bad</a>. My question is: <strong>in what situations would the use of <code>assign</code> be the appropriate, preferred, or only solution</strong>?</p>