title: Error: target of assignment expands to non-language object
body: <p>I am trying to dynamically clean up some column names for a large number of tables and I get the above error.</p>
  
  <p>I have a gut feeling that I should be using <code>quo</code> but I have no idea on how to do that.</p>
  
  <p>Any ideas? </p>
  
  <p>The <code>apply_alias</code> applies a set of business rules to clean the names. </p>
  
  <pre><code>apply_alias &lt;-  function(l){
    which(l=="Geography")
    l[which(l=="Geography")]  &lt;- "GEO"
  
    toupper(l)
  }
  </code></pre>
  
  <p>The <code>cleanup_column_names_tbl</code> applies the <code>alias_function</code> to a list of table</p>
  
  <pre><code>cleanup_column_names_tbl &lt;- function(PID){
    for(p in PID){
      names(get(paste0("tbl_",p))) &lt;- apply_alias(names(get(paste0("tbl_",p))))
    }
  }
  
  cleanup_column_names_tbl("14100287")
  </code></pre>
  
  <p>When I try to run it i get the following error message:</p>
  
  <pre><code>&gt; cleanup_column_names_tbl("14100287")
  Error in names(get(paste0("tbl_", p))) &lt;- apply_alias(names(get(paste0("tbl_",  : 
    target of assignment expands to non-language object
  </code></pre>
  
  <p><strong>Sample data:</strong></p>
  
  <pre><code>&gt; dput(tbl_14100287[1,])
  structure(list(V1 = 0L, REF_DATE = "1976-01", GEO = "Canada", 
      DGUID = "2016A000011124", `Labour force characteristics` = "Population", 
      Sex = "Both sexes", `Age group` = "15 years and over", Statistics = "Estimate", 
      `Data type` = "Seasonally adjusted", UOM = "Persons", UOM_ID = 249L, 
      SCALAR_FACTOR = "thousands", SCALAR_ID = 3L, VECTOR = "v2062809", 
      COORDINATE = "1.1.1.1.1.1", VALUE = 16852.4, STATUS = "", 
      SYMBOL = NA, TERMINATED = NA, DECIMALS = 1L), class = c("data.table", 
  "data.frame"), row.names = c(NA, -1L), .internal.selfref = &lt;pointer: 0x000002123cf21ef0&gt;)
  </code></pre>