R/vectorIsBinary.r

Defines functions vectorIsBinary

########## R-function: vectorIsBinary ##########

# Determine whether or not a vector contains
# only binary data, defined to be that all 
# entries are either 0 or 1.

# Last changed: 21 JUN 2021

vectorIsBinary <- function(x)
   return(length(setdiff(x,c(0,1)))==0)

########## End of vectorIsBinary ############

Try the gamselBayes package in your browser

Any scripts or data that you put into this service are public.

gamselBayes documentation built on June 8, 2025, 10:21 a.m.