R/allDagsJonas.R

allDagsJonas <- 
function (adj,row.names)
{
    # Input: adj. mat of a DAG with row.names, containing the undirected component that 
    #        should be extended
    # !!!! the function can probably be faster if we use partial orderings 
    
    a <- adj[row.names,row.names]
    
    if(any((a + t(a))==1))
    {
        #warning("The matrix is not entirely undirected.")
        return(-1)
    }
    return(allDagsIntern(adj, a, row.names,NULL))
}

Try the SID package in your browser

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

SID documentation built on June 22, 2024, 11:34 a.m.