You can use something like this to keep running your algorithm
# repeat until all values are positive
repeat{
x <- rnorm(10)
if (all(x >= 0)) break # conditions met; quit
}
On Thu, Jul 3, 2008 at 5:25 AM, Nadeem Shafique
<[EMAIL PROTECTED]> wrote:
> Respected All,
>
> I hope you are en
Respected All,
I hope you are enjoying good health, I am tring to write a program in R but
could not be very sucessful. My program draws random sample form bivariate
normal distribution and then compute a variable PIJ. For certian samples
some entries of variable PIJ is apearing as negative, which
2 matches
Mail list logo