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.eich...@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

______________________________________________
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