Hi,
I am trying to permute a vector for 1000 times for which I am using for
loop.Within the for loop, I am doing some matrix operations which is taking
a lot of time. I am looking for a way to permute the vector 1000 times and
do the operations of the matrix without using for loop. This a snippet of my
code:
for (i in 2:1000){
y.permute = permute(y.permute) ### permute the vector
F.stats = calPseudoStat(y.permute,table.Gij) ## call the function
which does some matrix calculation and calculates a pseudo statistics
F.stats.vec = append(F.stats.vec, F.stats) ## add the Pseudo
Statistics in a vector.
}
Thanks.
--
Regards,
Ayush Raman
[[alternative HTML version deleted]]