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]
>
> 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<erinm.hodg...@gmail.com>  wrote:
>> 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
>> University of Houston - Downtown
>> mailto: erinm.hodg...@gmail.com
>>
>> ______________________________________________
>> R-help@r-project.org 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.
>>
>
>

-- 
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calan...@uni-hamburg.de

**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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