R/morphomapArray2matrix.R

Defines functions morphomapArray2matrix

Documented in morphomapArray2matrix

#' morphomapArray2matrix
#' 
#' Convert an array into a matrix
#' @param array an array
#' @return mat a matrix
#' @author Antonio Profico, Luca Bondioli, Pasquale Raia, Paul O'Higgins, Damiano Marchi
#' @export

morphomapArray2matrix<-function(array){
  mat <- matrix(aperm(array, c(1, 3, 2)), nrow=dim(array)[1]* dim(array)[3], ncol=dim(array)[2] )
  return(mat)
}

Try the morphomap package in your browser

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

morphomap documentation built on Oct. 10, 2023, 1:08 a.m.