search for: b_nn

Displaying 1 result from an estimated 1 matches for "b_nn".

Did you mean: _nn
2010 Jan 19
1
change codes into loops
...t;-rank(c(a1[i,j],a2[i,j],a3[i,j]))[1] b_2[i,j]<-rank(c(a1[i,j],a2[i,j],a3[i,j]))[2] b_3[i,j]<-rank(c(a1[i,j],a2[i,j],a3[i,j]))[3] } } The inner codes is really repeated, so i want to change the inner codes into loops. Take nn is from 1 to 3, something like, for (nn in 1:3) { b_nn[i,j]<-rank(c(a1[i,j]:a3[i,j]))[nn] } Anybody can tell me the correct method to specify the above codes? Thanks. -- ----------------- Jane Chang Queen's [[alternative HTML version deleted]]