[R] Named components in a list

William Dunlap wdunlap at tibco.com
Thu Nov 10 23:55:22 CET 2011

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-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of JulioSergio
> Sent: Thursday, November 10, 2011 2:02 PM
> To: r-help at 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 at 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.

More information about the R-help mailing list