Re: [R] Logical vectors

2010-11-04 Thread Stephen Liu
Hi Ted, Thanks for your advice and the correction on the document concerned. B.R. Stephen L - Original Message From: "ted.hard...@wlandres.net" To: r-help@r-project.org Cc: Stephen Liu ; R-Devel Sent: Thu, November 4, 2010 5:08:42 PM Subject: Re: [R] Logical vectors On

Re: [R] Logical vectors

2010-11-04 Thread Stephen Liu
1] TRUE FALSE FALSE FALSE FALSE I got it thanks. B.R. Stephen L - Original Message From: Gerrit Eichner To: Stephen Liu Cc: r-help@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

Re: [R] Logical vectors

2010-11-04 Thread Ted Harding
On 04-Nov-10 08:56:42, Gerrit Eichner wrote: > 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

Re: [R] Logical vectors

2010-11-04 Thread Gerrit Eichner
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]

Re: [R] Logical vectors

2010-11-04 Thread Stephen Liu
R. Stephen L - Original Message From: Joshua Wiley To: Stephen Liu Cc: r-help@r-project.org Sent: Thu, November 4, 2010 2:46:15 PM Subject: Re: [R] Logical vectors On Wed, Nov 3, 2010 at 10:50 PM, Stephen Liu wrote: > Hi folks, > > Pls help me to understand follow; > >

Re: [R] Logical vectors

2010-11-04 Thread Stephen Liu
FALSE FALSE FALSE B.R. Stephen L - Original Message From: Gerrit Eichner To: Stephen Liu Cc: r-help@r-project.org Sent: Thu, November 4, 2010 2:34:55 PM Subject: Re: [R] Logical vectors On Wed, 3 Nov 2010, Stephen Liu wrote: [snip] > 2) >> x > [1] 1 2 3 4 5 >>

Re: [R] Logical vectors

2010-11-03 Thread Joshua Wiley
On Wed, Nov 3, 2010 at 10:50 PM, Stephen Liu wrote: > Hi folks, > > Pls help me to understand follow; > > An Introduction to R > > 2.4 Logical vectors > http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics > > 1) >> x > [1] 1 2 3 4 5 a vector, x, is defined with 5 elements, {1, 2,

Re: [R] Logical vectors

2010-11-03 Thread Gerrit Eichner
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 greate

[R] Logical vectors

2010-11-03 Thread Stephen Liu
Hi folks, Pls help me to understand follow; An Introduction to R 2.4 Logical vectors http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics 1) > x [1] 1 2 3 4 5 > temp <- x != 1 > temp [1] FALSE TRUE TRUE TRUE TRUE > 2) > x [1] 1 2 3 4 5 > temp <- x > 1 > temp [1] FALSE TRU