[R] Logical vectors
Gerrit Eichner
Gerrit.Eichner at math.uni-giessen.de
Thu Nov 4 07:34:55 CET 2010
On Wed, 3 Nov 2010, Stephen Liu wrote:
[snip]
> 2)
>> x
> [1] 1 2 3 4 5
>> temp <- x > 1
>> temp
> [1] FALSE TRUE TRUE TRUE TRUE
>
>
> Why NOT
>> temp
> [1] TRUE FALSE FALSE FALSE FALSE
>
> ?
Maybe because of the definition of ">" (greater (!) than)? Or do you
expect 1 to be greater than 1 and not greater than 2, 3, 4, and 5?
Regards -- Gerrit
---------------------------------------------------------------------
AOR Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen
Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany
Fax: +49-(0)641-99-32109 http://www.uni-giessen.de/cms/eichner
More information about the R-help
mailing list