That is a misleading example. It should say that the name 'matrix' is ignored or use Lst["matrix"] <- list(Mat).
(And not all objects can be extended by subscripting. E.g., you cannot extend the number of rows of a matrix with mat[nrow(mat)+1, ] <- 1:ncol(mat). vectors may be extended by subscripting.) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of JulioSergio > Sent: Thursday, November 10, 2011 2:02 PM > To: r-h...@stat.math.ethz.ch > Subject: Re: [R] Named components in a list > > Bert Gunter <gunter.berton <at> gene.com> writes: > > > > > Inline Below. > > Well, Bert, then the manual where I found the example must be wrong. It is: > > http://cran.r-project.org/doc/manuals/R-intro.html#Constructing-and-modifying- > lists > > And textually it says: > > Lists, like any subscripted object, can be extended by specifying additional > components. For example > > > Lst[5] <- list(matrix=Mat) > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.