is.binary.matrix: Is a matrix binary one?

Description Usage Arguments Value Examples

View source: R/is.binary.matrix-functions.R

Description

Tests whether given matrix is a binary one.

Usage

1

Arguments

x

matrix

Value

TRUE/FALSE

Examples

1
2
3
4
5
6
7
8
library("similarity")

m <- matrix(c(1, 2, NA, 2), nrow=2, ncol=2)
b <- matrix(c(1, 1, 0, 1), nrow=2, ncol=2)

is.binary.matrix(m)    # FALSE
is.binary.matrix(1:10) # FALSE
is.binary.matrix(b)    # TRUE

sgibb/similarity documentation built on May 29, 2019, 8:04 p.m.