R/CMATT.R

Defines functions CMATT

Documented in CMATT

#' This function changes a 3D array to a matrix using row-bind
#' @param darr  3D array of dimension =(p,d,n)
#' @param nobj Number of object (=n)
#' @keywords CMATT
#' @return matrix of dimension (pn*d)
#' @export
#' @examples
#' a =  sample(1:5,24,replace = TRUE)
#' dim(a) = c(3,2,4)
#' print("3-dimension array:")
#' print(a)
#' b=CMAT(a,nobj=4)
#'print(b)


CMATT=function(darr, nobj)
{temp=darr[,,1]
for(i in 2:nobj)
{
  temp=rbind(temp,darr[,,i])
}
return(temp)
}
debashischatterjee111/Bligom documentation built on Dec. 31, 2020, 11:15 p.m.