title: Is there a way to extract a data frame from a list, and assign the data frame to an object with a dynamic name?
body: <p>I have a list containing many named data frames. I am trying to find a way to extract each data frame from this list. Ultimately, the goal is to assign each data frame in the list to an object according to the name that it has in the list, allowing me to reference the data frames directly instead of through the list (eg. dataframe instead of LIST[[dataframe]])</p>
  <p>Here is an example similar to what I am working with.</p>
  <pre><code>library(googlesheets4)
  inst.pkg(&quot;dplyr&quot;)
  library(dplyr)
  gs4_deauth()
  
  TABLES &lt;- list(&quot;Test1&quot;, &quot;Test2&quot;)
  readTable &lt;- function(TABLES){
    TABLES &lt;- range_read(as_sheets_id(&quot;SHEET ID&quot;),sheet = TABLES)
    TABLES &lt;-as.data.frame(TABLES)
    TABLES &lt;- TABLES %&gt;%
    transmute(Column1= as.character(Column1), Column2 = as.character(Column2 ))
    return(TABLES)}
  LIST &lt;- lapply(TABLES, readTable)
  names(LIST) &lt;- TABLES
  </code></pre>
  <p>I know that this could be done manually, but I'm trying to find a way to automate this process. Any advice would be helpful. Thanks in advance.</p>