Jenny,
are there any missing values in your vectors? If so, what effect do you
think this will have on an expression like that required by the if statement
that must resolve fully to either true or false?

Regards,

Mike

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jenny Stadt
Sent: 17 October 2006 18:19
To: r-help@stat.math.ethz.ch
Subject: [R] if statement error

Hi List,

I was not able to make this work. I know it is a simple one, sorry to
bother. Give me some hints pls. Thanks!

Jen





if(length(real.d)>=30 && length(real.b)>=30 && beta1*beta2*theta1*theta2>0 )

{ r <- 1;  corr <- 1;  }


real.d and real.b are two vectors, beta1,beta2,theta1,and theta2 are
constants. The error occurred like this:


Error in if (length(real.d) >= 30 && length(real.b) >= 30 && beta1 * beta2 *
: 
        missing value where TRUE/FALSE needed

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to