title: How does assignment into function return value work?
body: <p>I have stumbled apon this code:</p>
  
  <pre><code>colnames(dataFrame) &lt;- c("firstCol", "secondCol")
  </code></pre>
  
  <p>which renames columns of given dataframe dataFrame. What is happening there? How can I possibly assign something to return value?</p>
  
  <p><a href="http://www.r-fiddle.org/#/fiddle?id=SJpEfp16" rel="nofollow" title="Corresponding R-fiddle">Corresponding R-fiddle</a></p>