R/makeContrastAlt.R

Defines functions makeContrastsAlt

#'\code{makeContrastsAlt}
#'
#'Making the contrast matrix
#'
#'Aurelien Dugourd

makeContrastsAlt <- function(targets, comparisons)
{
  cont.matrix <- matrix(0,nrow = length(unique(targets$condition)), ncol = length(comparisons))
  i <- 1
  for (comparison in comparisons)
  {
    for (j in 1:length(comparison))
    {
      cont.matrix[abs(comparison[j]),i] <- cont.matrix[abs(comparison[j]),i]+(comparison[j]/abs(comparison[j]))
    }
    i <- i + 1
  }
  return(cont.matrix)
}
saezlab/PHONEMeS-ILP documentation built on June 21, 2022, 5:36 p.m.