list assignment
Peter Dalgaard BSA
p.dalgaard@biostat.ku.dk
19 Nov 1998 18:53:19 +0100
Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
> There appears to be a problem with name matching in list assignment:
>
> Version 0.63.0 (November 14, 1998)
> ...
> > r <- list()
> > r$forecast.cov.trend <- 1:12
> > r$forecast.cov.zero <- 1:12
> > r$forecast.cov <- 1:2
> > length(r$forecast.cov)
> [1] 0 #should be 2
> >
Odd, and clearly a bug. Probably rather in indexing rather than
assigment, though:
> a<-list(1,2,3)
> names(a)<-c("aa","ab", "a")
> a$a
NULL
> a[["a"]]
[1] 3
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._