R/mulInt.R

Defines functions mulInt

Documented in mulInt

mulInt <- function(...){
   nam <- as.character(match.call(expand.dots = TRUE))[-1L]
   lst <- list(...)
   out <- vector()
   ref <- unique(unlist(lst))
   for(i in 1:length(lst)){
      map <- rep(0, length(ref))
      map[match(lst[[i]], ref, nomatch = 0)] <- 1
      out <- cbind(out, map)
   }
   rownames(out) <- ref
   colnames(out) <- nam
   return(out)
}

Try the Mulcom package in your browser

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

Mulcom documentation built on Nov. 8, 2020, 5:53 p.m.