data(gmG)
n <- nrow (gmG8$x)
V <- colnames(gmG8$x) # labels aka node names
amat <- wgtMatrix(gmG8$g)
amat[amat != 0] <- 1
if(requireNamespace("dagitty", quietly = TRUE)) {
dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
}
Run the code above in your browser using DataLab