Re: [R] Help in splitting a list

2011-04-05 Thread Henrique Dallazuanna
Try this: mapply('[', lapply(mylist, as.data.frame), c(index, lapply(index, `!`)), SIMPLIFY = FALSE) On Tue, Apr 5, 2011 at 7:46 AM, Lars Bishop wrote: > Dear R users, > > Let's say I have a list with components being 'm' matrices (as exemplified > in the "mylist" object below). Now, I'd like t

[R] Help in splitting a list

2011-04-05 Thread Lars Bishop
Dear R users, Let's say I have a list with components being 'm' matrices (as exemplified in the "mylist" object below). Now, I'd like to subset this list based on an index vector, which will partition each matrix 'm' in 2 sub-matrices. My questions are: 1. Is there an elegant way to have the resu