R Under development (unstable) (2024-09-06 r87103 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(pcalg) > > amat1 <- t(cbind(c(0,1,0,1,0),c(0,0,1,0,1),c(0,0,0,1,1),c(0,0,0,0,1),c(0,0,0,0,0))) > amat2 <- t(cbind(c(0,1,0,1,1),c(0,0,0,0,1),c(0,0,0,0,1),c(0,0,0,0,1),c(0,0,0,0,0))) > > g1 <- as(amat1,"graphNEL") > g2 <- as(amat2,"graphNEL") > > res <- compareGraphs(g1,g2) > > if ((round(res["tpr"],5)!=0.83333) | (round(res["fpr"],5)!=0.5) | (round(res["tdr"],5)!=0.71429)) { + stop("Test of compareGraphs: Theoretical values not matched!") + } > > > proc.time() user system elapsed 0.76 0.20 0.95