R/AdjustMatrix.R

# Adjust the columns of the input matrix to have

# the same ordering as in the reference matrix

AdjustMatrix <- function (reference, input) {
  
  if (any (colnames (reference) != colnames (input))) {
    
    Order_node <- match (colnames (reference), colnames (input))
    
    return (input[Order_node, Order_node])
    
  } else {
    
    return (input)
  }
}
audreyqyfu/mrpc2 documentation built on April 17, 2022, 7:36 a.m.