Description Usage Arguments Value Examples

Returns the result of *x\Longrightarrow y*.

1 2 3 | ```
implies(x, y)
x %implies% y
``` |

`x, y` |
Logical vectors of the same length. |

Logical implies: `TRUE`

unless `x`

is `TRUE`

and `y`

is `FALSE`

.

`NA`

in either `x`

or `y`

results in `NA`

if and only if the result is unknown.
In particular `NA %implies% TRUE`

is `TRUE`

and `FALSE %implies% NA`

is `TRUE`

.

If `x`

or `y`

are length-one, the function proceeds as if the length-one vector were recycled
to the length of the other.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
library(data.table)
CJ(x = c(TRUE,
FALSE),
y = c(TRUE,
FALSE))[, ` x => y` := x %implies% y][]
#> x y x => y
#> 1: FALSE FALSE TRUE
#> 2: FALSE TRUE TRUE
#> 3: TRUE FALSE FALSE
#> 4: TRUE TRUE TRUE
# NA results:
#> 5: NA NA NA
#> 6: NA FALSE NA
#> 7: NA TRUE TRUE
#> 8: FALSE NA TRUE
#> 9: TRUE NA NA
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.