R/ADJ.R

Defines functions ADJ

ADJ <-function(X){
  J <- colnames(X)
  K <- ncol(X)
  n <- nrow(X)
  ADJ.mat <- matrix(0,nrow=K,ncol=K)
  ADJ.mat <- t(as.matrix(X)) %*% as.matrix(X) / n
  ADJ.mat[!lower.tri(ADJ.mat)] <- NA
  dimnames(ADJ.mat) <- list(J,J)
  return(ADJ.mat)
}

Try the mudfold package in your browser

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

mudfold documentation built on Nov. 24, 2022, 5:09 p.m.