Description Usage Arguments Value Examples
is.binary is used to test if a vector is of binary type, i.e. if a vector contains only 0 and/or 1 values.
1 | is.binary(x)
|
x |
a vector to be tested. |
is.binary returns TRUE or FALSE depending on whether a vector is of binary type or not.
1 2 3 4 |
Loading required package: tidyverse
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
✔ ggplot2 3.3.2 ✔ purrr 0.3.4
✔ tibble 3.0.4 ✔ dplyr 1.0.2
✔ tidyr 1.1.2 ✔ stringr 1.4.0
✔ readr 1.4.0 ✔ forcats 0.5.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
[1] FALSE
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.