check_true_binary: Check if a one dimensional vector has only integer elements 0...

Description Usage Arguments Details Examples

Description

check_true_binary returns TRUE if all of the elements in the argument are either integers of value 0 or 1. check_true_binary returns FALSE if not all of the elements in the argument are integers of value 0 or 1.

Usage

1
check_true_binary(bin_chain)

Arguments

bin_chain

A one dimensional vector.

Details

This function checks every element of its argument to see if they contain either the integer values 0 or 1.

Examples

1
2
3
4
check_true_binary(c(1,0,0,1,0,0,0,1))
check_true_binary(c("A","B","B","B","A","B","A","A"))
check_true_binary(c(TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE,TRUE,
FALSE))

cwcartmell/maRkov documentation built on May 14, 2019, 1:37 p.m.