title: incompatible types in subassignment type fix (R)
body: <p>I have the following code and error message that I'm not sure how to solve:</p>
  
  <blockquote>
    <p>require("XLConnect")</p>
    
    <p>wkb &lt;- c(1:7)</p>
    
    <p>for (k in 1:7) {
    +   wkb[k] &lt;- loadWorkbook(paste("RNK", k, "1114.xls", sep=""))
    + }</p>
  </blockquote>
  
  <pre><code>Error in wkb[(k - 9)] &lt;- loadWorkbook(paste("RNK", k, "1114.xls", sep = "")) : 
    incompatible types (from S4 to integer) in subassignment type fix
  </code></pre>
  
  <p>Can anyone please help?</p>