R/pairwise_association.R

Defines functions pairwise_association

Documented in pairwise_association

pairwise_association <- function(mat, method="condentropy")
{
  nsp <- nrow(mat)
  m_spxsp <- outer(1:nsp, 1:nsp, FUN=Vectorize(function(i,j) { do.call(method, args=list(X=mat[i,], Y=mat[j,])) }))
  
  diag(m_spxsp) <- NA
  
  return(m_spxsp)
}

Try the netassoc package in your browser

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

netassoc documentation built on May 2, 2019, 6:49 a.m.