[R] Logical vectors

Stephen Liu satimis at yahoo.com
Thu Nov 4 10:29:37 CET 2010


H Gerrit,

> the phrase "exact equality" refers to the operator "==", i. e. to the last 
> element "==" in the enumeration (<, <=, >, >=, ==), and not to its first.


> x <- 1:5
> x
[1] 1 2 3 4 5

> temp <-x == 1
> temp
[1]  TRUE FALSE FALSE FALSE FALSE

I got it thanks.

B.R.
Stephen L




----- Original Message ----
From: Gerrit Eichner <Gerrit.Eichner at math.uni-giessen.de>
To: Stephen Liu <satimis at yahoo.com>
Cc: r-help at r-project.org
Sent: Thu, November 4, 2010 4:56:42 PM
Subject: Re: [R] Logical vectors

On Thu, 4 Nov 2010, Stephen Liu wrote:

[snip]

> In;
>
> 2.4 Logical vectors
> http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics
>
> It states:-
>
> The logical operators are <, <=, >, >=, == for exact equality and != for
> inequality ........
>
>>    # exact equality
> !=   # inequality

[snip]


Hello, Stephen,

in my understanding of the sentence

"The logical operators are <, <=, >, >=, == for exact equality and != for 
inequality ........"

the phrase "exact equality" refers to the operator "==", i. e. to the last 
element "==" in the enumeration (<, <=, >, >=, ==), and not to its first.

  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