Displaying 1 result from an estimated 1 matches for "tp3179400p3179439".
Did you mean:
tp3179400p3179400
2011 Jan 07
2
Summing over specific columns in a matrix
Hi,
I would like to sum some specific columns in my matrix- for example, my
matrix looks like this:
[,1] [,2] [,3] [,4] [,5]
[1,] 1 NA NA NA NA
[2,] 2 1 NA 1 NA
[3,] 3 2 1 2 1
[4,] 4 3 2 3 2
[5,] NA NA NA 4 3
[6,] NA NA NA 5 NA
I would like to find the sum of the first two columns, the second two
columns and