Re: [R] computation of matrices in list of list

2009-08-22 Thread Benilton Carvalho
result <- Reduce("+", unlist(z, recursive=FALSE)) b On Aug 22, 2009, at 2:03 PM, kathie wrote: Dear Gabor Grothendieck, thank you for your comments. Ive already tried that. but I've got this error message. Reduce("+",z) Error in f(init, x[[i]]) : non-numeric argument to binary operato

Re: [R] computation of matrices in list of list

2009-08-22 Thread David Winsemius
On Aug 22, 2009, at 1:03 PM, kathie wrote: Dear Gabor Grothendieck, thank you for your comments. Ive already tried that. but I've got this error message. Reduce("+",z) Error in f(init, x[[i]]) : non-numeric argument to binary operator > Reduce("+", c( LL[[1]], LL[[2]] ) ) [,1] [

Re: [R] computation of matrices in list of list

2009-08-22 Thread Steve Lianoglou
Hi Kathie, On Sat, Aug 22, 2009 at 1:03 PM, kathie wrote: Dear Gabor Grothendieck, > > > thank you for your comments. > > Ive already tried that. but I've got this error message. > > > > Reduce("+",z) > Error in f(init, x[[i]]) : non-numeric argument to binary operator > > > anyway, thanks > >

Re: [R] computation of matrices in list of list

2009-08-22 Thread kathie
Dear Gabor Grothendieck, thank you for your comments. Ive already tried that. but I've got this error message. > Reduce("+",z) Error in f(init, x[[i]]) : non-numeric argument to binary operator anyway, thanks ps. > is.matrix(z[[1]][[1]]) [1] TRUE I guess the reason "Reduce" doesn't wor

Re: [R] computation of matrices in list of list

2009-08-22 Thread Gabor Grothendieck
See this: https://stat.ethz.ch/pipermail/r-help/2009-August/208002.html On Sat, Aug 22, 2009 at 11:41 AM, kathie wrote: > > Dear R users, > > I have the list as follows; > > #-- > >> z > > [[1]] > [[1]][[1]] > > matrix(A) > > [[1]][[2]] > > matr

[R] computation of matrices in list of list

2009-08-22 Thread kathie
Dear R users, I have the list as follows; #-- > z [[1]] [[1]][[1]] matrix(A) [[1]][[2]] matrix(B) [[1]][[3]] matrix(C) [[2]] [[2]][[1]] matrix(D) [[2]][[2]] matrix(E) [[2]][[3]] matrix(F) #-