Re: [R] missing value where TRUE/FALSE needed ERROR

2016-02-09 Thread Maram SAlem
Thanks for helping thanoon. I used the if() { } else { . } and it worked better On 9 February 2016 at 15:56, thanoon younis wrote: > Hi, > > Try to check

[R] missing value where TRUE/FALSE needed ERROR

2016-02-09 Thread Maram SAlem
Hi all, I'm trying to write a function to implement a Metropolis-within-Gibbs algorithm for two parameters.I'm including a naive version here so as to be able to spot the error I got. So I first generate the vectors, X and R, that will help to start the algorithm using (for example): n=8; m=5;