Evaluation of the NOT, AND, OR logical statements below in MySQL
5.5.30-log Community Server (GPL) replicate R's truth tables for NOT,
AND, OR. See MySQL queries (below), which are in agreement with R
truth table code posted in this thread:
bash-3.2$ mysql
Welcome to the MySQL monitor. Commands
Looking below and online, R's truth tables for NOT, AND, OR are
identical to the NOT, AND, OR truth tables originating from Stephen
Cole Kleene's "strong logic of indeterminacy", as demonstrated on the
Wikipedia page entitled, "Three-Valued Logic"--specifically in the
section entitled "Kleene and P
On Fri, May 19, 2017 at 6:38 AM, S Ellison wrote:
>> TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be
>> either TRUE or FALSE and consequently is NA.
>>
>> OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE.
>>
>> As I said *think* about it; don't just go with your immedia
On 20/05/2017 5:53 AM, Martin Maechler wrote:
Ramnik Bansal
on Sat, 20 May 2017 08:52:55 +0530 writes:
> Taking this question further.
> If I use a complex number or a numeric as an operand in logical
> operations, to me it APPEARS that these two types are first coerced to
> Ramnik Bansal
> on Sat, 20 May 2017 08:52:55 +0530 writes:
> Taking this question further.
> If I use a complex number or a numeric as an operand in logical
> operations, to me it APPEARS that these two types are first coerced to
> LOGICAL internally and then THIS lo
Taking this question further.
If I use a complex number or a numeric as an operand in logical
operations, to me it APPEARS that these two types are first coerced to
LOGICAL internally and then THIS logical output is further used as the
operand.
For eg.
> x <- 4+5i; c(x & F, x & T, x | F, x | T)
[
[I unadvertently sent my reply below to Jeremie, instead of R-help.
Also, I havve had an additional thought which may clarify things
for R users].
[Original reply]:
The point about this is that (as Rolf wrote) FALSE & (anything)
is FALSE, provided logical NA is either TRUE ot FALSE but,
because the
FALSE & FALSE -> FALSE
FALSE & TRUE -> FALSE
Why do you need to know what the second value is? It doesn't matter what it
is... the answer is FALSE.
--
Sent from my phone. Please excuse my brevity.
On May 19, 2017 5:24:06 AM PDT, "Jérémie Juste" wrote:
>My apologies if I was not clear enough,
On 19/05/2017 8:48 AM, S Ellison wrote:
SQL, for example, generally takes the view that any
expression involving 'missing' is 'missing'.
Well, then SQL gets it wrong.
Well, that's a view. But paraphrasing an R Turner from a few lines away in the
same email:
One should be very, very circum
> On 19 May 2017, at 14:24 , Jérémie Juste wrote:
>
> My apologies if I was not clear enough,
>
> TRUE & NA could be either TRUE or FALSE and consequently is NA.
> why is FALSE & NA = FALSE? NA could be TRUE or FALSE, so FALSE & NA
> should be NA?
>
At the risk of flogging a dead horse:
F
> > SQL, for example, generally takes the view that any
> > expression involving 'missing' is 'missing'.
>
> Well, then SQL gets it wrong.
Well, that's a view. But paraphrasing an R Turner from a few lines away in the
same email:
> One should be very, very circumspect about presuming to know
My apologies if I was not clear enough,
TRUE & NA could be either TRUE or FALSE and consequently is NA.
why is FALSE & NA = FALSE? NA could be TRUE or FALSE, so FALSE & NA
should be NA?
On Fri, May 19, 2017 at 2:13 PM, Rolf Turner
wrote:
> On 20/05/17 00:01, Jérémie Juste wrote:
>
>> Hello,
On 20/05/17 00:01, Jérémie Juste wrote:
Hello,
Rolf said,
TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be
either TRUE or FALSE and consequently is NA.
OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE.
According to this logic why is
FALSE & NA
[1] FALSE
Huh
On 19/05/17 23:38, S Ellison wrote:
TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be
either TRUE or FALSE and consequently is NA.
OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE.
As I said *think* about it; don't just go with your immediate knee-jerk
(simplistic) rea
Hello,
Rolf said,
TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be
either TRUE or FALSE and consequently is NA.
OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE.
According to this logic why is
> FALSE & NA
>
[1] FALSE
?
Best regards,
Jeremie
On Fri, May 19, 2017
> TRUE & FALSE is FALSE but TRUE & TRUE is TRUE, so TRUE & NA could be
> either TRUE or FALSE and consequently is NA.
>
> OTOH FALSE & (anything) is FALSE so FALSE & NA is FALSE.
>
> As I said *think* about it; don't just go with your immediate knee-jerk
> (simplistic) reaction.
Hmm... not sure t
On 19/05/17 21:48, Ramnik Bansal wrote:
Hi,
I need to understand the inconsistent behaviour of & and I operators when
used with NA.
The code below explains this inconsistency
TRUE & NA
[1] NA
FALSE & NA
[1] FALSE
TRUE & NA
[1] NA
FALSE | NA
[1] NA
TRUE | NA
[1] TRUE
TRUE == N
17 matches
Mail list logo