The two statements below with 'names' are conceptually
the same.  The second performs the desired operation
while the first does not.

> xx <- list(A=c(a=1, b=2))
> names(xx$A[1]) <- "changed"
> xx
$A
a b
1 2

> names(xx$A)[1] <- "changed"
> xx
$A
changed       b
     1       2

This is observed in 2.4.0 on Linux as well as 2.7.0 and
2.8.0  on Windows XP.


Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to