Description Usage Arguments Examples
Function to check the number of v-structures in a graph.
1 | number_v_nodes(pdag)
|
pdag |
1 2 3 4 5 6 7 8 9 10 11 12 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (pdag)
{
ind <- which((pdag == 1 & t(pdag) == 0), arr.ind = TRUE)
v_nodes <- ind[duplicated(ind[, 2]), 2]
no_v_nodes <- length(v_nodes)
return(no_v_nodes)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.