title: Error in <my code> : object of type 'closure' is not subsettable
body: <p>I was finally able to work out the code for <a href="https://stackoverflow.com/q/11295618/1468366">my scraping</a>. It seemed to be working fine and then all of a sudden when I ran it again, I got the following error message:</p>
  
  <pre><code>Error in url[i] = paste("http://en.wikipedia.org/wiki/", gsub(" ", "_",  : 
    object of type 'closure' is not subsettable
  </code></pre>
  
  <p>I am not sure why as I changed nothing in my code.</p>
  
  <p>Please advise.</p>
  
  <pre><code>library(XML)
  library(plyr)
  
  names &lt;- c("George Clooney", "Kevin Costner", "George Bush", "Amar Shanghavi")
  
  for(i in 1:length(names)) {
      url[i] = paste('http://en.wikipedia.org/wiki/', gsub(" ","_", names[i]) , sep="")
  
      # some parsing code
  }
  </code></pre>