R/getGeneVals.R

Defines functions getGeneVals

getGeneVals <- function(uids, evidence, as.factor = TRUE)
{
  val = numeric(length(uids))
  ind.loc = which(uids %in% evidence$uid)
  if (length(ind.loc)) {
  	ind.val = match(uids[ind.loc],evidence$uid)
  	val[ind.loc] = evidence$val[ind.val]
  }
  if (as.factor) val <- factor(val, levels = c(-1,0,1))
  val
}
kouroshz/creNet documentation built on Feb. 25, 2018, 12:41 p.m.