R/mCoeff.R

mCoeff <-
function (v=NULL,L=NULL) {
 if ( is.null(v) ) stop("The first parameter is missing")
 if ( is.null(L) ) stop("The second parameter is missing")    
 if (typeof(v)=="list") {
     for (u in L) { 
         if ( setequal( v ,u[[1]]  ) & length(v)==length(u[[1]]) ) return(u[[2]]);
    }
 }
 else {
     for (u in L ) {
 if (identical(as.double(v),as.double(c(u[[1]])))) return(u[[2]])};
 }
 return(0);
}

Try the kStatistics package in your browser

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

kStatistics documentation built on June 8, 2022, 5:05 p.m.