title: How to add column in Power BI by run R script in query editor
body: <p>1 - Enter a table call : <strong>"Table1"</strong></p>
  
  <pre><code>Year   Profit
  2019   300
  2018   200
  2017   100
  </code></pre>
  
  <p>2 - Run this script in button <strong>"Run R Script"</strong> in Power Query Editor</p>
  
  <pre><code># 'dataset' holds the input data for this script
  
  dataset &lt;- as.data.frame(Table1)
  dataset["new"] &lt;- NA
  </code></pre>
  
  <p>3 - Error :</p>
  
  <pre><code>DataSource.Error: ADO.NET: R script error.
   as.data.frame(Table1) Error:  no object 'Table1'
  </code></pre>
  
  <p>What is the method to solve this error ?</p>