[R] Creating the mean using algebra matrix
flokke
ingaschwabe at gmail.com
Tue Oct 11 19:45:43 CEST 2011
Dear all,
I wanted to create the mean using a algebra matrix.
so I tried this one:
> meanAnimals <- new3%*%factorial
(Calculates the matrix multiplication of the new3 * factorial).
But I get the following error message:
Error in new3 %*% factorial : non-conformable arguments
These are my matrices:
> new3
[,1] [,2]
[1,] 1.350 8.1
[2,] 465.000 423.0
[3,] 36.330 119.5
[4,] 27.660 115.0
[5,] 1.040 5.5
[6,] 11700.000 50.0
[7,] 2547.000 4603.0
[8,] 187.100 419.0
[9,] 521.000 655.0
[10,] 10.000 115.0
[11,] 3.300 25.6
[12,] 529.000 680.0
[13,] 207.000 406.0
[14,] 62.000 1320.0
[15,] 6654.000 5712.0
[16,] 9400.000 70.0
[17,] 6.800 179.0
[18,] 35.000 56.0
[19,] 0.120 1.0
[20,] 0.023 0.4
[21,] 2.500 12.1
[22,] 55.500 175.0
[23,] 100.000 157.0
[24,] 52.160 440.0
[25,] 0.280 1.9
[26,] 87000.000 154.5
[27,] 0.122 3.0
[28,] 192.000 180.0
> factorial
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[,14] [,15] [,16] [,17]
[1,] 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1
[,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [,28]
[1,] 1 1 1 1 1 1 1 1 1 1 1
Can anyone help me out of this?
Cheers, maria
--
View this message in context: http://r.789695.n4.nabble.com/Creating-the-mean-using-algebra-matrix-tp3895378p3895378.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list