Displaying 1 result from an estimated 1 matches for "fa2b".
Did you mean:
f2b
2013 Jan 27
2
Loops
...a1<-(colSums(p[1:25,]))
fa2<-(colSums(p[26:50,]))
fa3<-(colSums(p[51:75,]))
fa4<-(colSums(p[76:100,]))
fa5<-(colSums(p[1:100,]))
and then I need to apply to each of them the following:
fa1b<-c()
for (i in 1:3){
fa1b[i]<-(100-(100*abs(fa1[i]/sum(fa1[i])-(1/3))))
}
fa2b<-c()
for (i in 1:3){
fa2b[i]<-(100-(100*abs(fa2[i]/sum(fa2[i])-(1/3))))
}
and so on.
Is there a more efficient way to do this?
Thanks for your time!
Francesca
----------------------------------
Francesca Pancotto, PhD
Università di Modena e Reggio Emilia
Viale A. Allegri, 9
40121 Reg...