[R] Find the sign

Alaios alaios at yahoo.com
Mon Jan 24 19:18:03 CET 2011


Hello :)
I wanted to right an expression to check when x and y have the same sign
and I wrote the following:

 if ((x<0 && y<0) || (x>0 && y>0)) 

which looks pretty ugly to me.

Can you please suggest me a better way for that?

Regards
Alex



More information about the R-help mailing list