Re: [R] Query: list within a list

2012-02-22 Thread R. Michael Weylandt
It's certainly possible and I don't think you get any grueling inefficiencies. along the way. Another way that might or might not make sense for you is to use a nifty trick I saw Gabor and Duncan M use a few weeks ago: you can give dimensionality to a list and then subset it in the "normal" ways:

Re: [R] Query: list within a list

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 16:17 +0100, Stefano Sofia a écrit : > Dear R users, > I have difficulty to create a list within a list. > Example: with > > > A <- vector(mode="list", 4) > > I create a list of 4 elements: > > A > [[1]] > NULL > > [[2]] > NULL > > [[3]] > NULL > > [[4]] > NULL >

[R] Query: list within a list

2012-02-22 Thread Stefano Sofia
Dear R users, I have difficulty to create a list within a list. Example: with > A <- vector(mode="list", 4) I create a list of 4 elements: > A [[1]] NULL [[2]] NULL [[3]] NULL [[4]] NULL In each element of this list I can store, for example, a matrix: A[[1]] <- matrix ... I need each element