title: Error in changing a row name of a data frame: target of assignment expands to non-language object
body: <p>I'm trying to make a set of data frames, where they have respectively different number of rows.(data frames: seg1 through seg10)
  But after the <code>rbind</code> process, the last row name becomes a number that I'd like to change into 'center' character, and here's what I tried.</p>
  
  <pre><code>for (i in 1:10){
    assign( paste( "seg", i, sep="" ), rbind( kth_df[ kth_km$cluster ==i, ], kth_km$centers[ i, ] ) )
    last_row &lt;- dim( get( paste( "seg", i, sep="" ) ) )[1]
    rownames( get( paste( "seg", i, sep="" ) ) )[last_row] &lt;- "center"
  }
  </code></pre>
  
  <p>but this gives me  </p>
  
  <blockquote>
    <p>'target of assignment expands to non-language object'</p>
  </blockquote>
  
  <p>error at the last sentence. I can't figure out what I did wrong and how I should change the code.
  Thanks for your help!</p>
  
  <pre><code> kth_df where cluster segment is 1
        1100  1111  1123  1126
  1     2      3     4     0
  2     3      0     1     2
  </code></pre>
  
  <p>And <code>kth_km</code> is a list coming after <code>kmeans</code> clustering on the data. So I want to add 'center' vector at the last row like</p>
  
  <pre><code>kth_df
        1100  1111  1123  1126
  1     2     3     4     0
  2     3     0     1     2
  3     2.5   1.5    2.5    1
  </code></pre>
  
  <p>And then change the last row name as 'center'.</p>