Re: [R] odd subset behavior

2010-08-30 Thread Ivan Calandra
Hi! I might be a bit late, but maybe you meant: x[x>= -0.50 | x<= -1.0] See ?"|" HTH, Ivan Le 8/29/2010 04:54, Joshua Wiley a écrit : > Dear Erin, > > -0.50 is greater than -1.00, this means that your logical test returns > all FALSE answers. Now consider the results of: > > x[FALSE] > >

Re: [R] odd subset behavior

2010-08-28 Thread Joshua Wiley
Dear Erin, -0.50 is greater than -1.00, this means that your logical test returns all FALSE answers. Now consider the results of: x[FALSE] you are selecting none of 'x', hence numeric(0). Perhaps you mean: x[x <= -0.50 & x >= -1.0] HTH, Josh On Sat, Aug 28, 2010 at 7:47 PM, Erin Hodgess w

[R] odd subset behavior

2010-08-28 Thread Erin Hodgess
Dear R People: I just produced the following: x <- seq(-3,3,.01) x[x>= -0.50 & x<= -1.0] numeric(0) x[x>= -0.50 && x<= -1.0] numeric(0) What am I doing wrong, please? This seems strange. Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences Uni