Re: [R] Repeat a loop until...

2011-10-19 Thread Dénes TÓTH
If you want to generate truncated distributions, package 'tmvtnorm' can help you out. Regards, Denes >> >> Dear all, >> >> I know there have been various questions posted over the years about > loops >> but I'm afraid that I'm still stuck. I am using Windows XP and R 2.9.2. >> I am generati

Re: [R] Repeat a loop until...

2011-10-19 Thread Petr PIKAL
Hi I may be completely off track without knowing mnormt package but what about using while loop for counting rows in "correct" datamat. #first set your matrix datamat <- rmnorm(n=1500,mean=c(mean(sanad[,1]),mean(sanad[,2]),mean(sanad[,3])),varcov=covmat) #get rid of out of spec values datamat