Hello!
let:
test<-1:3 list(test) names(test)<-c("X11","X12","Y23")
test[["Y2"]]
3
I had assumed that the names in a list are like a keys in a hash. Therefore i thought that no value should be returned.
The behavior of:
test["Y2"]
<NA> NA
is as i expected.
Should it be as it is? How is the definition of [[]] and []?
No! See "An Introduction to R", Section 6.1:
"The names of components may be abbreviated down to the minimum number of letters needed to identify them uniquely. Thus Lst$coefficients may be minimally specified as Lst$coe and Lst$covariance as Lst$cov."
Uwe Ligges
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help