R/areShiftSetsEqual.R

Defines functions areShiftSetsEqual

# Tests whether two sets of shifts are exactly identical
#	a = vector of shift nodes
#   b = vector of shift nodes

areShiftSetsEqual <- function(a, b){
	if (length(a) != length(b)){
		return(FALSE);
	}else if (length(a) == 0 & length(b) == 0){
		return(TRUE);
	}else{
		if (length(intersect(a,b)) != length(a)){
			return(FALSE);
		}else{
			return(TRUE);
		}
	}
}

 

Try the BAMMtools package in your browser

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

BAMMtools documentation built on July 16, 2022, 1:05 a.m.