title: Setting an xts Index
body: <p>Build an xts object with two rows.   </p>
  
  <pre><code>library(xts)   
  junk&lt;-xts(c(1,2),as.Date(c("2010-01-01","2010-05-01")))   
  junk   
  &gt;            [,1]
  &gt; 2010-01-01    1   
  &gt; 2010-05-01    2   
  </code></pre>
  
  <p>Why doesn't the following change the index for the first row?   </p>
  
  <pre><code>time(junk[1])&lt;-as.Date("2010-02-01")   
  junk   
  &gt;            [,1]
  &gt; 2010-01-01    1   
  &gt; 2010-05-01    2   
  </code></pre>
  
  <p>I realize that the following works, but why doesn't the above work?   </p>
  
  <pre><code>time(junk)[1]&lt;-as.Date("2010-02-01")   
  junk   
  &gt;            [,1]
  &gt; 2010-02-01    1   
  &gt; 2010-05-01    2   
  </code></pre>
  
  <p>Thanks,<br>
  Bill   </p>