[R] using a list to index elements of a list

Benilton Carvalho beniltoncarvalho at gmail.com
Tue Mar 23 17:07:17 CET 2010


and in addition to bill's suggestion, you may want to consider not
growing a list.

Instead of 'v <- list()', use:

v <- vector("list", nrow(A))

b

> Will your code work as you wish if you
> replace the "for(v[[1]] in x[[1]]) { ... }"
> with the following?
>   for(i in x[[1]]) {
>      v[[2]] <- i
>      ...
>   }
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com



More information about the R-help mailing list