Re: [R] Questions on dividing lists and tapply

2011-03-16 Thread Rohit Pandey
Awesome,that worked! Thanks. On Wed, Mar 16, 2011 at 6:46 AM, Henrique Dallazuanna wrote: > Try this: > > mapply('/', l1, l2, SIMPLIFY = FALSE) > > and > > tapply(1:5, lapply(indxLi, as.numeric), sum) > > > On Tue, Mar 15, 2011 at 6:06 PM, Rohit Pandey > wrote: > > > > Hello R community, > > >

Re: [R] Questions on dividing lists and tapply

2011-03-15 Thread Henrique Dallazuanna
Try this: mapply('/', l1, l2, SIMPLIFY = FALSE) and tapply(1:5, lapply(indxLi, as.numeric), sum) On Tue, Mar 15, 2011 at 6:06 PM, Rohit Pandey wrote: > > Hello R community, > > I have two questions about using R. > > The first is about dividing each element of a list with another similar > si

[R] Questions on dividing lists and tapply

2011-03-15 Thread Rohit Pandey
Hello R community, I have two questions about using R. The first is about dividing each element of a list with another similar sized list. So, if the first list has two elements and so does the second, then the result should also be a list with two elements. For example, the inputs are: list(ma