R/whichAeqB.R

Defines functions whichAeqB

Documented in whichAeqB

whichAeqB <- function(A, B, errNoMatch='no match',
                      err2Match='more than one match'){
    ab <- which(A %in% B)
    nab <- length(ab)
    if(nab<1){
        stop(errNoMatch)
    }
    if(nab>1){
        stop(err2Match)
    }
    ab
}
sbgraves237/Ecfun documentation built on Dec. 3, 2024, 12:37 p.m.