Displaying 1 result from an estimated 1 matches for "b_ijn".
Did you mean:
b_ij
2010 Jan 19
1
change codes into loops
Hi,
See example.
for (i in 1:2) {
for (j in 1:3) {
b_1[i,j]<-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) {