Ok, I know this waybut if i have a lot of matrix, does a function exist to
sum all of them elements by elements?


2009/5/21 Jorge Ivan Velez <jorgeivanve...@gmail.com>

>
> Dear Daniele,
> Try this:
>
> A <- matrix(1:10,ncol=2)
> B <- matrix(10:20,ncol=2)
> A+B
> #[,1] [,2]
> #[1,]   11   21
> #[2,]   13   23
> #[3,]   15   25
> #[4,]   17   27
> #[5,]   19   29
>
> HTH,
>
> Jorge
>
>
> On Thu, May 21, 2009 at 11:11 AM, daniele riggi 
> <daniele.ri...@gmail.com>wrote:
>
>> Someone knows the existence of a function to sum the elements of the same
>> place A[i,j] B[i,j] of a matrix?thank you
>>
>>
>> --
>> Dr. Daniele Riggi, PhD student
>> University of Milano-Bicocca
>> Department of Statistics
>> Building U7, Via Bicocca degli Arcimboldi, 8
>> 20126 Milano, Italy
>> cell. +39 328 3380690
>> mailto: daniele.ri...@gmail.com
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>


-- 
Dr. Daniele Riggi, PhD student
University of Milano-Bicocca
Department of Statistics
Building U7, Via Bicocca degli Arcimboldi, 8
20126 Milano, Italy
cell. +39 328 3380690
mailto: daniele.ri...@gmail.com

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to