[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

[R] (no subject)

2018-07-15 Thread Atanasio Alberto Tembe Tembe
Hello! Is there anyone who can help me to this the error bellow? Ijust started using R recently. Thank you while sum(abs(Sb-D-Sc-t(Pi))>1E-5{Error: unexpected symbol in "while sum"> > k=K+1> > for(i in 1:nrow(c1)){+ + for(j in 1:ncol(c1)){+ +