Re: [R] Query on while loop

2018-07-20 Thread Bert Gunter
I don't know how to say this charitably, but your post indicates that you **really need to go through an R tutorial or two.** Rather than give you answers to these very basic matters, a couple of hints: 1. A and P are vectors with 3 elements, not matrices . 2. I presume things like c11 and c32 a

[R] Query on while loop

2018-07-20 Thread Atanasio Alberto Tembe Tembe
Hello, I have two matrices: a<-matrix(c(100,350,100,240,150,210,60,120,200 ),3,3) and c<-matrix(c(2,9,13,10,4,11,14,12,3),3,3). I have also defined the following variables: K=0 A[i,j]=colSums(a) P[i,j]=rowSums(a) F[i,j]=c[i,j]^(-2 ) Using these data I want to perform the calculation which must