title: Rename object in R using contents of string object
body: <p>I want to change the name of an object to another name, which is contained in a string object.</p>
  <p>Specifically, I want to change the <code>mtcars</code> to <code>mtcars_new_name</code>. I started by creating an object called <code>name_object</code> using the code below:</p>
  <p><code>name_object &lt;- &quot;mtcars_new_name&quot;</code></p>
  <p>I then tried to put the <code>mtcars</code> object into the first element of the <code>name_object</code>, but it didn't work:</p>
  <pre><code>&gt; name_object[1] &lt;- mtcars
  Warning message:
  In `[&lt;-.data.frame`(`*tmp*`, 1, value = list(mpg = c(21, 21, 22.8,  :
    provided 11 variables to replace 1 variables
  </code></pre>
  <p>This didn't not produce the desired result, and I don't know how to cure this. Please advice.</p>