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
>
> 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
For this, you might want to take a look at the first example in ?Reduce.
HTH,
Jorge
On Thu, May 21, 2009 at 11:21 AM, daniele riggi wrote:
> 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
>
>
>
daniele riggi 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
Yes:
+
Uwe Ligges
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
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 wrote:
> Someone knows the existence of a function to sum the el
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
mailt
5 matches
Mail list logo