R/coupler.classes.adj.R

coupler.classes.adj <-
function(mat)
{
    n <- nrow(mat)
    v <- 1:n
    mat <- mat - diag(1, nrow=n, ncol=n)
    
    l <- lapply(v, coupler.classes.adj.i, mat=mat)
    lg <- lapply(l, length)
    nm <- rownames(mat)

    nm <- rep(nm, lg)  
    l <-  unlist(l)
        
    couples <- matrix(c(nm, l), nrow=length(l), ncol=2)
    
    nm <- as.integer(nm)   
    l <-  as.integer(l)
    
    ind <- which(nm < l)
    
    couples <- couples[ind,]

    return(couples)
}

Try the SPODT package in your browser

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

SPODT documentation built on May 2, 2019, 9:43 a.m.