CRAN Package Check Results for Package pcalg

Last updated on 2019-04-22 01:47:51 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.6-0 94.32 934.93 1029.25 ERROR
r-devel-linux-x86_64-debian-gcc 2.6-0 78.57 847.59 926.16 ERROR
r-devel-linux-x86_64-fedora-clang 2.6-0 2270.49 ERROR
r-devel-linux-x86_64-fedora-gcc 2.6-0 2245.19 ERROR
r-devel-windows-ix86+x86_64 2.6-0 237.00 4682.00 4919.00 ERROR
r-patched-linux-x86_64 2.6-0 91.52 929.38 1020.90 ERROR
r-patched-solaris-x86 2.6-0 2432.90 ERROR
r-release-linux-x86_64 2.6-0 90.97 364.65 455.62 OK
r-release-windows-ix86+x86_64 2.6-0 182.00 807.00 989.00 NOTE
r-release-osx-x86_64 2.6-0 NOTE
r-oldrel-windows-ix86+x86_64 2.6-0 263.00 820.00 1083.00 NOTE
r-oldrel-osx-x86_64 2.6-0 NOTE

Check Details

Version: 2.6-0
Check: use of SHLIB_OPENMP_*FLAGS in Makefiles
Result: NOTE
     src/Makevars.win: incorrect macro SHLIB_OPENMP_CFLAGS included in PKG_CXXFLAGS
     src/Makevars.win: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but linking is by C++
    Use of these macros is discussed in sect 1.2.1.1 of 'Writing R
    Extensions'. The macros for different languages may differ so the
    matching macro must be used in PKG_CXXFLAGS (etc) and match that used
    in PKG_LIBS (except for Fortran: see the manual).
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-linux-x86_64

Version: 2.6-0
Check: examples
Result: ERROR
    Running examples in 'pcalg-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: backdoor
    > ### Title: Find Set Satisfying the Generalized Backdoor Criterion (GBC)
    > ### Aliases: backdoor
    > ### Keywords: multivariate models graphs
    >
    > ### ** Examples
    >
    > #####################################################################
    > ##DAG
    > #####################################################################
    > ## Simulate the true DAG
    > set.seed(123)
    > p <- 7
    > myDAG <- randomDAG(p, prob = 0.2) ## true DAG
    >
    > ## Extract the adjacency matrix of the true DAG
    > true.amat <- (amat <- as(myDAG, "matrix")) != 0 # TRUE/FALSE <==> 1/0
    > print.table(1*true.amat, zero.=".") # "visualization"
     1 2 3 4 5 6 7
    1 . . . 1 . . .
    2 . . . 1 . . 1
    3 . . . . . . 1
    4 . . . . 1 . .
    5 . . . . . . 1
    6 . . . . . . .
    7 . . . . . . .
    >
    > ## Compute set satisfying the GBC:
    > backdoor(true.amat, 5, 7, type="dag")
    [1] 4
    > ## Don't show:
    > stopifnot(backdoor(true.amat, 5, 7, type="dag") == 3)
    Error: backdoor(true.amat, 5, 7, type = "dag") == 3 is not TRUE
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64

Version: 2.6-0
Check: tests
Result: ERROR
     Running 'test_LINGAM.R' [5s/5s]
     Running 'test_addBgKnowledge.R' [3s/4s]
     Running 'test_adjustment.R' [4s/5s]
     Running 'test_ages.R' [3s/4s]
     Running 'test_amat2dag.R' [3s/3s]
     Running 'test_arges.R' [3s/3s]
     Running 'test_backdoor.R' [10s/10s]
     Comparing 'test_backdoor.Rout' to 'test_backdoor.Rout.save' ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630,642
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running 'test_bicscore.R' [3s/4s]
     Running 'test_causalEffect.R' [3s/3s]
     Running 'test_compareGraphs.R' [3s/3s]
     Running 'test_dag2cpdag.R' [3s/3s]
     Running 'test_dag2essgraph.R' [3s/3s]
     Running 'test_displayAmat.R' [3s/3s]
     Running 'test_dsep.R' [3s/3s]
     Running 'test_fci.R' [3s/3s]
     Running 'test_fciPlus.R' [5s/6s]
     Running 'test_gSquareBin.R' [3s/3s]
     Running 'test_gSquareDis.R' [5s/5s]
     Running 'test_gac.R' [5s/6s]
     Running 'test_getNextSet.R' [3s/3s]
     Running 'test_gies.R' [7s/8s]
     Running 'test_ida.R' [10m/10m]
     Running 'test_idaFast.R' [7s/8s]
     Running 'test_isValidGraph.R' [6s/6s]
     Running 'test_jointIda.R' [3s/4s]
     Running 'test_mat2targets.R' [3s/3s]
     Running 'test_pc.R' [4s/5s]
     Running 'test_pcSelect.R' [2s/3s]
     Running 'test_pcalg2dagitty.R' [3s/3s]
     Running 'test_pcorOrder.R' [3s/3s]
     Running 'test_pdag2allDags.R' [2s/3s]
     Running 'test_pdag2dag.R' [3s/3s]
     Running 'test_possDeAn.R' [3s/4s]
     Running 'test_randDAG.R' [3s/3s]
     Running 'test_randomDAG.R' [3s/3s]
     Running 'test_rfci.R' [6s/6s]
     Running 'test_rmvDAG.R' [3s/3s]
     Running 'test_shd.R' [3s/3s]
     Running 'test_skeleton.R' [7s/7s]
     Running 'test_udag2pag.R' [2s/3s]
     Running 'test_udag2pdag.R' [6s/7s]
     Running 'test_wgtMatrix.R' [3s/3s]
    Running the tests in 'tests/test_ages.R' failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in 'tests/test_causalEffect.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in 'tests/test_displayAmat.R' failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in 'tests/test_ida.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 5.397 0.154 6.62 0.013 0.001
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
     Killed
    Running the tests in 'tests/test_idaFast.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in 'tests/test_pcSelect.R' failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in 'tests/test_pcalg2dagitty.R' failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in 'tests/test_randDAG.R' failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in 'tests/test_rmvDAG.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in 'tests/test_shd.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in 'tests/test_udag2pdag.R' failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages"
     [2] "/home/hornik/tmp/R.check/r-devel-clang/Work/build/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in 'tests/test_wgtMatrix.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.6-0
Check: tests
Result: ERROR
     Running ‘test_LINGAM.R’ [3s/5s]
     Running ‘test_addBgKnowledge.R’ [3s/4s]
     Running ‘test_adjustment.R’ [3s/5s]
     Running ‘test_ages.R’ [2s/4s]
     Running ‘test_amat2dag.R’ [2s/3s]
     Running ‘test_arges.R’ [2s/4s]
     Running ‘test_backdoor.R’ [7s/11s]
     Comparing ‘test_backdoor.Rout’ to ‘test_backdoor.Rout.save’ ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630,642
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running ‘test_bicscore.R’ [3s/3s]
     Running ‘test_causalEffect.R’ [2s/3s]
     Running ‘test_compareGraphs.R’ [2s/3s]
     Running ‘test_dag2cpdag.R’ [2s/4s]
     Running ‘test_dag2essgraph.R’ [2s/4s]
     Running ‘test_displayAmat.R’ [2s/4s]
     Running ‘test_dsep.R’ [2s/3s]
     Running ‘test_fci.R’ [2s/3s]
     Running ‘test_fciPlus.R’ [4s/6s]
     Running ‘test_gSquareBin.R’ [2s/3s]
     Running ‘test_gSquareDis.R’ [3s/4s]
     Running ‘test_gac.R’ [4s/6s]
     Running ‘test_getNextSet.R’ [2s/3s]
     Running ‘test_gies.R’ [5s/8s]
     Running ‘test_ida.R’ [10m/13m]
     Running ‘test_idaFast.R’ [5s/8s]
     Running ‘test_isValidGraph.R’ [4s/6s]
     Running ‘test_jointIda.R’ [3s/4s]
     Running ‘test_mat2targets.R’ [2s/4s]
     Running ‘test_pc.R’ [3s/4s]
     Running ‘test_pcSelect.R’ [2s/3s]
     Running ‘test_pcalg2dagitty.R’ [2s/4s]
     Running ‘test_pcorOrder.R’ [2s/3s]
     Running ‘test_pdag2allDags.R’ [2s/3s]
     Running ‘test_pdag2dag.R’ [2s/3s]
     Running ‘test_possDeAn.R’ [2s/4s]
     Running ‘test_randDAG.R’ [2s/4s]
     Running ‘test_randomDAG.R’ [2s/3s]
     Running ‘test_rfci.R’ [4s/6s]
     Running ‘test_rmvDAG.R’ [2s/4s]
     Running ‘test_shd.R’ [2s/3s]
     Running ‘test_skeleton.R’ [5s/8s]
     Running ‘test_udag2pag.R’ [2s/3s]
     Running ‘test_udag2pdag.R’ [4s/7s]
     Running ‘test_wgtMatrix.R’ [2s/4s]
    Running the tests in ‘tests/test_ages.R’ failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_causalEffect.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in ‘tests/test_displayAmat.R’ failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_ida.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 4.054 0.105 5.693 0.011 0
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
     Killed
    Running the tests in ‘tests/test_idaFast.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in ‘tests/test_pcSelect.R’ failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in ‘tests/test_pcalg2dagitty.R’ failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in ‘tests/test_randDAG.R’ failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in ‘tests/test_rmvDAG.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in ‘tests/test_shd.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in ‘tests/test_udag2pdag.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages"
     [2] "/home/hornik/tmp/R.check/r-devel-gcc/Work/build/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in ‘tests/test_wgtMatrix.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 2.6-0
Check: installed package size
Result: NOTE
     installed size is 11.4Mb
     sub-directories of 1Mb or more:
     data 2.1Mb
     doc 1.1Mb
     libs 6.1Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-windows-ix86+x86_64, r-patched-solaris-x86, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 2.6-0
Check: examples
Result: ERROR
    Running examples in ‘pcalg-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: backdoor
    > ### Title: Find Set Satisfying the Generalized Backdoor Criterion (GBC)
    > ### Aliases: backdoor
    > ### Keywords: multivariate models graphs
    >
    > ### ** Examples
    >
    > #####################################################################
    > ##DAG
    > #####################################################################
    > ## Simulate the true DAG
    > set.seed(123)
    > p <- 7
    > myDAG <- randomDAG(p, prob = 0.2) ## true DAG
    >
    > ## Extract the adjacency matrix of the true DAG
    > true.amat <- (amat <- as(myDAG, "matrix")) != 0 # TRUE/FALSE <==> 1/0
    > print.table(1*true.amat, zero.=".") # "visualization"
     1 2 3 4 5 6 7
    1 . . . 1 . . .
    2 . . . 1 . . 1
    3 . . . . . . 1
    4 . . . . 1 . .
    5 . . . . . . 1
    6 . . . . . . .
    7 . . . . . . .
    >
    > ## Compute set satisfying the GBC:
    > backdoor(true.amat, 5, 7, type="dag")
    [1] 4
    > ## Don't show:
    > stopifnot(backdoor(true.amat, 5, 7, type="dag") == 3)
    Error: backdoor(true.amat, 5, 7, type = "dag") == 3 is not TRUE
    Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86

Version: 2.6-0
Check: tests
Result: ERROR
     Running ‘test_LINGAM.R’
     Running ‘test_addBgKnowledge.R’
     Running ‘test_adjustment.R’
     Running ‘test_ages.R’
     Running ‘test_amat2dag.R’
     Running ‘test_arges.R’
     Running ‘test_backdoor.R’ [10s/11s]
     Comparing ‘test_backdoor.Rout’ to ‘test_backdoor.Rout.save’ ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630,642
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running ‘test_bicscore.R’
     Running ‘test_causalEffect.R’
     Running ‘test_compareGraphs.R’
     Running ‘test_dag2cpdag.R’
     Running ‘test_dag2essgraph.R’
     Running ‘test_displayAmat.R’
     Running ‘test_dsep.R’
     Running ‘test_fci.R’
     Running ‘test_fciPlus.R’
     Running ‘test_gSquareBin.R’
     Running ‘test_gSquareDis.R’
     Running ‘test_gac.R’
     Running ‘test_getNextSet.R’
     Running ‘test_gies.R’
     Running ‘test_ida.R’ [30m/33m]
     Running ‘test_idaFast.R’
     Running ‘test_isValidGraph.R’
     Running ‘test_jointIda.R’
     Running ‘test_mat2targets.R’
     Running ‘test_pc.R’
     Running ‘test_pcSelect.R’
     Running ‘test_pcalg2dagitty.R’
     Running ‘test_pcorOrder.R’
     Running ‘test_pdag2allDags.R’
     Running ‘test_pdag2dag.R’
     Running ‘test_possDeAn.R’
     Running ‘test_randDAG.R’
     Running ‘test_randomDAG.R’
     Running ‘test_rfci.R’
     Running ‘test_rmvDAG.R’
     Running ‘test_shd.R’
     Running ‘test_skeleton.R’
     Running ‘test_udag2pag.R’
     Running ‘test_udag2pdag.R’
     Running ‘test_wgtMatrix.R’
    Running the tests in ‘tests/test_ages.R’ failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_causalEffect.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in ‘tests/test_displayAmat.R’ failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_ida.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 5.186 0.273 6.049 0.007 0.009
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
    Running the tests in ‘tests/test_idaFast.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in ‘tests/test_pcSelect.R’ failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in ‘tests/test_pcalg2dagitty.R’ failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in ‘tests/test_randDAG.R’ failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in ‘tests/test_rmvDAG.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in ‘tests/test_shd.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in ‘tests/test_udag2pdag.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "/data/gannet/ripley/R/packages/tests-clang/pcalg.Rcheck"
     [2] "/data/gannet/ripley/R/test-clang"
     [3] "/data/gannet/ripley/R/R-clang/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in ‘tests/test_wgtMatrix.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 2.6-0
Check: tests
Result: ERROR
     Running ‘test_LINGAM.R’
     Running ‘test_addBgKnowledge.R’
     Running ‘test_adjustment.R’
     Running ‘test_ages.R’
     Running ‘test_amat2dag.R’
     Running ‘test_arges.R’
     Running ‘test_backdoor.R’
     Comparing ‘test_backdoor.Rout’ to ‘test_backdoor.Rout.save’ ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630,642
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running ‘test_bicscore.R’
     Running ‘test_causalEffect.R’
     Running ‘test_compareGraphs.R’
     Running ‘test_dag2cpdag.R’
     Running ‘test_dag2essgraph.R’
     Running ‘test_displayAmat.R’
     Running ‘test_dsep.R’
     Running ‘test_fci.R’
     Running ‘test_fciPlus.R’
     Running ‘test_gSquareBin.R’
     Running ‘test_gSquareDis.R’
     Running ‘test_gac.R’
     Running ‘test_getNextSet.R’
     Running ‘test_gies.R’
     Running ‘test_ida.R’ [30m/32m]
     Running ‘test_idaFast.R’
     Running ‘test_isValidGraph.R’
     Running ‘test_jointIda.R’
     Running ‘test_mat2targets.R’
     Running ‘test_pc.R’
     Running ‘test_pcSelect.R’
     Running ‘test_pcalg2dagitty.R’
     Running ‘test_pcorOrder.R’
     Running ‘test_pdag2allDags.R’
     Running ‘test_pdag2dag.R’
     Running ‘test_possDeAn.R’
     Running ‘test_randDAG.R’
     Running ‘test_randomDAG.R’
     Running ‘test_rfci.R’
     Running ‘test_rmvDAG.R’
     Running ‘test_shd.R’
     Running ‘test_skeleton.R’
     Running ‘test_udag2pag.R’
     Running ‘test_udag2pdag.R’
     Running ‘test_wgtMatrix.R’
    Running the tests in ‘tests/test_ages.R’ failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_causalEffect.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in ‘tests/test_displayAmat.R’ failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_ida.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 5.09 0.15 6.121 0.004 0.013
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
    Running the tests in ‘tests/test_idaFast.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in ‘tests/test_pcSelect.R’ failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in ‘tests/test_pcalg2dagitty.R’ failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in ‘tests/test_randDAG.R’ failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in ‘tests/test_rmvDAG.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in ‘tests/test_shd.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in ‘tests/test_udag2pdag.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "/data/gannet/ripley/R/packages/tests-devel/pcalg.Rcheck"
     [2] "/data/gannet/ripley/R/test-3.7"
     [3] "/data/gannet/ripley/R/R-devel/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in ‘tests/test_wgtMatrix.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 2.6-0
Check: running examples for arch ‘i386’
Result: ERROR
    Running examples in 'pcalg-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: backdoor
    > ### Title: Find Set Satisfying the Generalized Backdoor Criterion (GBC)
    > ### Aliases: backdoor
    > ### Keywords: multivariate models graphs
    >
    > ### ** Examples
    >
    > #####################################################################
    > ##DAG
    > #####################################################################
    > ## Simulate the true DAG
    > set.seed(123)
    > p <- 7
    > myDAG <- randomDAG(p, prob = 0.2) ## true DAG
    >
    > ## Extract the adjacency matrix of the true DAG
    > true.amat <- (amat <- as(myDAG, "matrix")) != 0 # TRUE/FALSE <==> 1/0
    > print.table(1*true.amat, zero.=".") # "visualization"
     1 2 3 4 5 6 7
    1 . . . 1 . . .
    2 . . . 1 . . 1
    3 . . . . . . 1
    4 . . . . 1 . .
    5 . . . . . . 1
    6 . . . . . . .
    7 . . . . . . .
    >
    > ## Compute set satisfying the GBC:
    > backdoor(true.amat, 5, 7, type="dag")
    [1] 4
    > ## Don't show:
    > stopifnot(backdoor(true.amat, 5, 7, type="dag") == 3)
    Error: backdoor(true.amat, 5, 7, type = "dag") == 3 is not TRUE
    Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 2.6-0
Check: running examples for arch ‘x64’
Result: ERROR
    Running examples in 'pcalg-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: backdoor
    > ### Title: Find Set Satisfying the Generalized Backdoor Criterion (GBC)
    > ### Aliases: backdoor
    > ### Keywords: multivariate models graphs
    >
    > ### ** Examples
    >
    > #####################################################################
    > ##DAG
    > #####################################################################
    > ## Simulate the true DAG
    > set.seed(123)
    > p <- 7
    > myDAG <- randomDAG(p, prob = 0.2) ## true DAG
    >
    > ## Extract the adjacency matrix of the true DAG
    > true.amat <- (amat <- as(myDAG, "matrix")) != 0 # TRUE/FALSE <==> 1/0
    > print.table(1*true.amat, zero.=".") # "visualization"
     1 2 3 4 5 6 7
    1 . . . 1 . . .
    2 . . . 1 . . 1
    3 . . . . . . 1
    4 . . . . 1 . .
    5 . . . . . . 1
    6 . . . . . . .
    7 . . . . . . .
    >
    > ## Compute set satisfying the GBC:
    > backdoor(true.amat, 5, 7, type="dag")
    [1] 4
    > ## Don't show:
    > stopifnot(backdoor(true.amat, 5, 7, type="dag") == 3)
    Error: backdoor(true.amat, 5, 7, type = "dag") == 3 is not TRUE
    Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 2.6-0
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'test_LINGAM.R' [3s]
     Running 'test_addBgKnowledge.R' [3s]
     Running 'test_adjustment.R' [3s]
     Running 'test_ages.R' [3s]
     Running 'test_amat2dag.R' [2s]
     Running 'test_arges.R' [3s]
     Running 'test_backdoor.R' [7s]
     Comparing 'test_backdoor.Rout' to 'test_backdoor.Rout.save' ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630,642
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running 'test_bicscore.R' [3s]
     Running 'test_causalEffect.R' [2s]
     Running 'test_compareGraphs.R' [2s]
     Running 'test_dag2cpdag.R' [3s]
     Running 'test_dag2essgraph.R' [3s]
     Running 'test_displayAmat.R' [3s]
     Running 'test_dsep.R' [2s]
     Running 'test_fci.R' [2s]
     Running 'test_fciPlus.R' [4s]
     Running 'test_gSquareBin.R' [2s]
     Running 'test_gSquareDis.R' [4s]
     Running 'test_gac.R' [3s]
     Running 'test_getNextSet.R' [3s]
     Running 'test_gies.R' [6s]
     Running 'test_ida.R' [34m]
     Running 'test_idaFast.R' [6s]
     Running 'test_isValidGraph.R' [5s]
     Running 'test_jointIda.R' [2s]
     Running 'test_mat2targets.R' [3s]
     Running 'test_pc.R' [3s]
     Running 'test_pcSelect.R' [2s]
     Running 'test_pcalg2dagitty.R' [3s]
     Running 'test_pcorOrder.R' [2s]
     Running 'test_pdag2allDags.R' [2s]
     Running 'test_pdag2dag.R' [2s]
     Running 'test_possDeAn.R' [2s]
     Running 'test_randDAG.R' [3s]
     Running 'test_randomDAG.R' [2s]
     Running 'test_rfci.R' [4s]
     Running 'test_rmvDAG.R' [2s]
     Running 'test_shd.R' [2s]
     Running 'test_skeleton.R' [4s]
     Running 'test_udag2pag.R' [3s]
     Running 'test_udag2pdag.R' [4s]
     Running 'test_wgtMatrix.R' [2s]
    Running the tests in 'tests/test_ages.R' failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in 'tests/test_causalEffect.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in 'tests/test_displayAmat.R' failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in 'tests/test_ida.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 3.93 0.31 4.33 NA NA
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     > stopifnot(eff.est == eff.g.est)
     >
     > cat('Time elapsed additionally: ', proc.time() - .pt,"\n")
     Time elapsed additionally: 2009.49 0.11 2009.28 NA NA
     >
     > ## another special case (from Raphael Gervais)
     > set.seed(123)
     > p <- 7
     > myDAG <- randomDAG(p, prob = 0.2) ## true DAG
     > amatT <- as(myDAG, "matrix") # weighted adjacency matrix of true DAG
     > effT <- Rnd(amatT[2,3]*amatT[3,5]) # Causal effect of 2 on 5 from true DAG weighted matrix
     > myCPDAG <- dag2cpdag(myDAG) ## true CPDAG
     > covTrue <- trueCov(myDAG) ## true covariance matrix
     > effG <- Rnd(ida(2,5, covTrue,myCPDAG,method = "global"))
     >
     > if (!(effT %in% effG)) stop("Test ida special case: True effects were not recovered!")
     Error: Test ida special case: True effects were not recovered!
     Execution halted
    Running the tests in 'tests/test_idaFast.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in 'tests/test_pcSelect.R' failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in 'tests/test_pcalg2dagitty.R' failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in 'tests/test_randDAG.R' failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in 'tests/test_rmvDAG.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in 'tests/test_shd.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in 'tests/test_udag2pdag.R' failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "D:/temp/RtmpOcWur3/RLIBS_337347b387cd7"
     [2] "D:/RCompile/recent/R/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in 'tests/test_wgtMatrix.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 2.6-0
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'test_LINGAM.R' [3s]
     Running 'test_addBgKnowledge.R' [3s]
     Running 'test_adjustment.R' [5s]
     Running 'test_ages.R' [3s]
     Running 'test_amat2dag.R' [2s]
     Running 'test_arges.R' [3s]
     Running 'test_backdoor.R' [7s]
     Comparing 'test_backdoor.Rout' to 'test_backdoor.Rout.save' ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630,642
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running 'test_bicscore.R' [3s]
     Running 'test_causalEffect.R' [2s]
     Running 'test_compareGraphs.R' [2s]
     Running 'test_dag2cpdag.R' [3s]
     Running 'test_dag2essgraph.R' [2s]
     Running 'test_displayAmat.R' [3s]
     Running 'test_dsep.R' [2s]
     Running 'test_fci.R' [2s]
     Running 'test_fciPlus.R' [4s]
     Running 'test_gSquareBin.R' [2s]
     Running 'test_gSquareDis.R' [4s]
     Running 'test_gac.R' [4s]
     Running 'test_getNextSet.R' [2s]
     Running 'test_gies.R' [5s]
     Running 'test_ida.R' [36m]
     Running 'test_idaFast.R' [5s]
     Running 'test_isValidGraph.R' [4s]
     Running 'test_jointIda.R' [2s]
     Running 'test_mat2targets.R' [2s]
     Running 'test_pc.R' [3s]
     Running 'test_pcSelect.R' [2s]
     Running 'test_pcalg2dagitty.R' [2s]
     Running 'test_pcorOrder.R' [2s]
     Running 'test_pdag2allDags.R' [2s]
     Running 'test_pdag2dag.R' [2s]
     Running 'test_possDeAn.R' [2s]
     Running 'test_randDAG.R' [2s]
     Running 'test_randomDAG.R' [2s]
     Running 'test_rfci.R' [3s]
     Running 'test_rmvDAG.R' [2s]
     Running 'test_shd.R' [2s]
     Running 'test_skeleton.R' [5s]
     Running 'test_udag2pag.R' [3s]
     Running 'test_udag2pdag.R' [4s]
     Running 'test_wgtMatrix.R' [2s]
    Running the tests in 'tests/test_ages.R' failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in 'tests/test_causalEffect.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in 'tests/test_displayAmat.R' failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in 'tests/test_ida.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 4.41 0.4 4.85 NA NA
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     Fit - y: 8 x: 4 |b.hat= 0
     > stopifnot(eff.est == eff.g.est)
     >
     > cat('Time elapsed additionally: ', proc.time() - .pt,"\n")
     Time elapsed additionally: 2174.33 0.17 2174.51 NA NA
     >
     > ## another special case (from Raphael Gervais)
     > set.seed(123)
     > p <- 7
     > myDAG <- randomDAG(p, prob = 0.2) ## true DAG
     > amatT <- as(myDAG, "matrix") # weighted adjacency matrix of true DAG
     > effT <- Rnd(amatT[2,3]*amatT[3,5]) # Causal effect of 2 on 5 from true DAG weighted matrix
     > myCPDAG <- dag2cpdag(myDAG) ## true CPDAG
     > covTrue <- trueCov(myDAG) ## true covariance matrix
     > effG <- Rnd(ida(2,5, covTrue,myCPDAG,method = "global"))
     >
     > if (!(effT %in% effG)) stop("Test ida special case: True effects were not recovered!")
     Error: Test ida special case: True effects were not recovered!
     Execution halted
    Running the tests in 'tests/test_idaFast.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in 'tests/test_pcSelect.R' failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in 'tests/test_pcalg2dagitty.R' failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in 'tests/test_randDAG.R' failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in 'tests/test_rmvDAG.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in 'tests/test_shd.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in 'tests/test_udag2pdag.R' failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "D:/temp/RtmpOcWur3/RLIBS_337347b387cd7"
     [2] "D:/RCompile/recent/R/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in 'tests/test_wgtMatrix.R' failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 2.6-0
Check: tests
Result: ERROR
     Running ‘test_LINGAM.R’ [4s/5s]
     Running ‘test_addBgKnowledge.R’ [3s/4s]
     Running ‘test_adjustment.R’ [4s/5s]
     Running ‘test_ages.R’ [3s/3s]
     Running ‘test_amat2dag.R’ [3s/3s]
     Running ‘test_arges.R’ [3s/3s]
     Running ‘test_backdoor.R’ [9s/10s]
     Comparing ‘test_backdoor.Rout’ to ‘test_backdoor.Rout.save’ ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630,642
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running ‘test_bicscore.R’ [3s/4s]
     Running ‘test_causalEffect.R’ [2s/3s]
     Running ‘test_compareGraphs.R’ [3s/3s]
     Running ‘test_dag2cpdag.R’ [3s/3s]
     Running ‘test_dag2essgraph.R’ [3s/4s]
     Running ‘test_displayAmat.R’ [3s/3s]
     Running ‘test_dsep.R’ [3s/3s]
     Running ‘test_fci.R’ [3s/3s]
     Running ‘test_fciPlus.R’ [5s/5s]
     Running ‘test_gSquareBin.R’ [3s/3s]
     Running ‘test_gSquareDis.R’ [4s/5s]
     Running ‘test_gac.R’ [5s/5s]
     Running ‘test_getNextSet.R’ [3s/3s]
     Running ‘test_gies.R’ [7s/8s]
     Running ‘test_ida.R’ [10m/11m]
     Running ‘test_idaFast.R’ [7s/8s]
     Running ‘test_isValidGraph.R’ [5s/6s]
     Running ‘test_jointIda.R’ [3s/3s]
     Running ‘test_mat2targets.R’ [3s/3s]
     Running ‘test_pc.R’ [4s/4s]
     Running ‘test_pcSelect.R’ [2s/3s]
     Running ‘test_pcalg2dagitty.R’ [3s/3s]
     Running ‘test_pcorOrder.R’ [2s/3s]
     Running ‘test_pdag2allDags.R’ [3s/3s]
     Running ‘test_pdag2dag.R’ [3s/3s]
     Running ‘test_possDeAn.R’ [3s/3s]
     Running ‘test_randDAG.R’ [3s/3s]
     Running ‘test_randomDAG.R’ [3s/3s]
     Running ‘test_rfci.R’ [5s/6s]
     Running ‘test_rmvDAG.R’ [3s/3s]
     Running ‘test_shd.R’ [3s/3s]
     Running ‘test_skeleton.R’ [7s/8s]
     Running ‘test_udag2pag.R’ [2s/3s]
     Running ‘test_udag2pdag.R’ [6s/6s]
     Running ‘test_wgtMatrix.R’ [3s/3s]
    Running the tests in ‘tests/test_ages.R’ failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_causalEffect.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in ‘tests/test_displayAmat.R’ failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_ida.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 5.394 0.201 6.125 0.01 0.001
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
     Killed
    Running the tests in ‘tests/test_idaFast.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in ‘tests/test_pcSelect.R’ failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in ‘tests/test_pcalg2dagitty.R’ failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in ‘tests/test_randDAG.R’ failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in ‘tests/test_rmvDAG.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in ‘tests/test_shd.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in ‘tests/test_udag2pdag.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages"
     [2] "/home/hornik/tmp/R.check/r-patched-gcc/Work/build/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in ‘tests/test_wgtMatrix.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-patched-linux-x86_64

Version: 2.6-0
Check: tests
Result: ERROR
     Running ‘test_LINGAM.R’
     Running ‘test_addBgKnowledge.R’
     Running ‘test_adjustment.R’
     Running ‘test_ages.R’
     Running ‘test_amat2dag.R’
     Running ‘test_arges.R’
     Running ‘test_backdoor.R’ [12s/14s]
     Comparing ‘test_backdoor.Rout’ to ‘test_backdoor.Rout.save’ ...24,34c24,34
    < 1 . 1 1 . 1 1 . . . 1 1 .
    < 2 . . . . . . . . . 1 . 1
    < 3 . . . . . . . 1 . . . 1
    < 4 . . . . . . . . . . . .
    < 5 . . . . . . . 1 . . 1 .
    < 6 . . . . . . . . . 1 1 1
    < 7 . . . . . . . 1 . . . .
    < 8 . . . . . . . . . . . .
    < 9 . . . . . . . . . . 1 .
    < 10 . . . . . . . . . . . .
    < 11 . . . . . . . . . . . 1
    ---
    > 1 . . . 1 . 1 . . 1 1 1 1
    > 2 . . . . . 1 . 1 . . 1 .
    > 3 . . . . . . . . 1 . . .
    > 4 . . . . . . . . . 1 . .
    > 5 . . . . . . . . . . . .
    > 6 . . . . . . . . . . . .
    > 7 . . . . . . . . . . 1 .
    > 8 . . . . . . . . . 1 . .
    > 9 . . . . . . . . . 1 1 .
    > 10 . . . . . . . . . . 1 .
    > 11 . . . . . . . . . . . .
    57,58c57,58
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    67,77c67,77
    < ..$ 1 : logi NA
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    78a79,90
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    81,82c93,94
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    ---
    > ..$ 3 : int 1
    > ..$ 5 : NULL
    90c102
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    94c106
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    102,113d113
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    116,125c116,125
    < ..$ 2 : int 1
    < ..$ 3 : int 1
    < ..$ 4 : NULL
    < ..$ 5 : int 1
    < ..$ 7 : int 1
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: int 1
    < ..$ 11: int 1
    < ..$ 12: int 1
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    130,131c130,131
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    139,149c139,149
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    ---
    > ..$ 1 : int 2
    > ..$ 2 : logi NA
    > ..$ 3 : int 2
    > ..$ 4 : int 2
    > ..$ 5 : NULL
    > ..$ 6 : int 2
    > ..$ 7 : int 2
    > ..$ 9 : int 2
    > ..$ 10: int 2
    > ..$ 11: int 2
    > ..$ 12: int 2
    151,161c151,161
    < ..$ 1 : int(0)
    < ..$ 2 : int(0)
    < ..$ 3 : int(0)
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    < ..$ 7 : int(0)
    < ..$ 8 : int(0)
    < ..$ 10: int(0)
    < ..$ 11: int(0)
    < ..$ 12: int(0)
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    164,173c164,173
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    176,182c176,182
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    184,185c184,185
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    187,197c187,197
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    < ..$ 11: logi NA
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int 1
    > ..$ 3 : int 1
    > ..$ 4 : int 1
    > ..$ 5 : NULL
    > ..$ 6 : int 1
    > ..$ 7 : int 1
    > ..$ 8 : int 1
    > ..$ 9 : int 1
    > ..$ 10: int 1
    > ..$ 11: int 1
    216,220c216,220
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    222c222
    < ..$ 8 : logi NA
    ---
    > ..$ 8 : int(0)
    228,232c228,232
    < ..$ 1 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    ---
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    238c238
    < ..$ 12: logi NA
    ---
    > ..$ 12: int(0)
    239a240,251
    > ..$ 1 : int(0)
    > ..$ 2 : int(0)
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : int(0)
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : int(0)
    > ..$ 10: int(0)
    > ..$ 11: int(0)
    > ..$ 12: int(0)
    > $ 4 :List of 11
    241,243c253,255
    < ..$ 2 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 5 : NULL
    246,247c258,259
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    ---
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    251c263
    < $ 4 :List of 11
    ---
    > $ 5 :List of 11
    255c267
    < ..$ 5 : NULL
    ---
    > ..$ 4 : NULL
    263,274d274
    < $ 5 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    278,286c278,286
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : int(0)
    < ..$ 10: logi NA
    < ..$ 11: logi NA
    < ..$ 12: logi NA
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : int [1:2] 1 2
    > ..$ 5 : NULL
    > ..$ 7 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: int [1:2] 1 2
    > ..$ 12: int [1:2] 1 2
    291,292c291,292
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    300,311d299
    < ..$ 1 : int [1:3] 3 5 7
    < ..$ 2 : int [1:3] 3 5 7
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : int [1:3] 3 5 7
    < ..$ 7 : logi NA
    < ..$ 9 : int [1:3] 3 5 7
    < ..$ 10: int [1:3] 3 5 7
    < ..$ 11: int [1:3] 3 5 7
    < ..$ 12: int [1:3] 3 5 7
    < $ 9 :List of 11
    313c301
    < ..$ 2 : int(0)
    ---
    > ..$ 2 : logi NA
    315,317c303,305
    < ..$ 4 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : int(0)
    ---
    > ..$ 4 : int(0)
    > ..$ 5 : NULL
    > ..$ 6 : logi NA
    319c307
    < ..$ 8 : int(0)
    ---
    > ..$ 9 : int(0)
    321c309
    < ..$ 11: int(0)
    ---
    > ..$ 11: logi NA
    322a311,322
    > $ 9 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:2] 1 3
    > ..$ 3 : logi NA
    > ..$ 4 : int [1:2] 1 3
    > ..$ 5 : NULL
    > ..$ 6 : int [1:2] 1 3
    > ..$ 7 : int [1:2] 1 3
    > ..$ 8 : int [1:2] 1 3
    > ..$ 10: int [1:2] 1 3
    > ..$ 11: int [1:2] 1 3
    > ..$ 12: int [1:2] 1 3
    325,334c325,334
    < ..$ 2 : logi NA
    < ..$ 3 : int [1:3] 1 2 6
    < ..$ 4 : NULL
    < ..$ 5 : int [1:3] 1 2 6
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:3] 1 2 6
    < ..$ 8 : int [1:3] 1 2 6
    < ..$ 9 : int [1:3] 1 2 6
    < ..$ 11: int [1:3] 1 2 6
    < ..$ 12: int [1:3] 1 2 6
    ---
    > ..$ 2 : int [1:4] 1 4 8 9
    > ..$ 3 : int [1:4] 1 4 8 9
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    > ..$ 6 : int [1:4] 1 4 8 9
    > ..$ 7 : int [1:4] 1 4 8 9
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 11: int [1:4] 1 4 8 9
    > ..$ 12: int [1:4] 1 4 8 9
    337,343c337,343
    < ..$ 2 : int [1:4] 1 5 6 9
    < ..$ 3 : int [1:4] 1 5 6 9
    < ..$ 4 : NULL
    < ..$ 5 : logi NA
    < ..$ 6 : logi NA
    < ..$ 7 : int [1:4] 1 5 6 9
    < ..$ 8 : int [1:4] 1 5 6 9
    ---
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:5] 1 2 7 9 10
    > ..$ 4 : int [1:5] 1 2 7 9 10
    > ..$ 5 : NULL
    > ..$ 6 : int [1:5] 1 2 7 9 10
    > ..$ 7 : logi NA
    > ..$ 8 : int [1:5] 1 2 7 9 10
    345,346c345,346
    < ..$ 10: int [1:4] 1 5 6 9
    < ..$ 12: int [1:4] 1 5 6 9
    ---
    > ..$ 10: logi NA
    > ..$ 12: int [1:5] 1 2 7 9 10
    348,352c348,352
    < ..$ 1 : int [1:4] 2 3 6 11
    < ..$ 2 : logi NA
    < ..$ 3 : logi NA
    < ..$ 4 : NULL
    < ..$ 5 : int [1:4] 2 3 6 11
    ---
    > ..$ 1 : logi NA
    > ..$ 2 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : logi NA
    > ..$ 5 : NULL
    354,357c354,357
    < ..$ 7 : int [1:4] 2 3 6 11
    < ..$ 8 : int [1:4] 2 3 6 11
    < ..$ 9 : int [1:4] 2 3 6 11
    < ..$ 10: int [1:4] 2 3 6 11
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : int(0)
    > ..$ 9 : logi NA
    > ..$ 10: logi NA
    389,391c389,391
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    393,394c393,394
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    400a401,412
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    402,403c414,415
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    ---
    > ..$ 2 : int(0)
    > ..$ 4 : NULL
    405,406c417,418
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    ---
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    412c424
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    415c427
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    424,435d435
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    439,441c439,441
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    444c444
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    449,460d448
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    463,464c451,452
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    466,467c454,455
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    469c457
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    472c460
    < $ 8 :List of 11
    ---
    > $ 7 :List of 11
    475,477c463,477
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int(0)
    ---
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 8 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    479,481c479,481
    < ..$ 7 : int(0)
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    486,490c486,490
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    493c493
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    498,502c498,502
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    540,549c540,549
    < 1 0 2 0 3 0 0 0 2 2 2
    < 2 3 0 0 0 0 2 0 0 0 2
    < 3 0 0 0 0 0 0 0 0 0 0
    < 4 2 0 0 0 0 2 0 0 2 2
    < 5 0 0 0 0 0 2 0 0 0 0
    < 6 0 3 0 3 3 0 0 0 0 0
    < 7 0 0 0 0 0 0 0 0 2 2
    < 8 3 0 0 0 0 0 0 0 2 2
    < 9 3 0 0 3 0 0 3 3 0 2
    < 10 3 3 0 3 0 0 3 3 3 0
    ---
    > 1 0 0 2 0 0 0 2 2 2 3
    > 2 0 0 0 0 0 0 2 0 0 0
    > 3 3 0 0 0 0 0 0 2 0 0
    > 4 0 0 0 0 0 0 0 0 0 0
    > 5 0 0 0 0 0 0 0 0 2 0
    > 6 0 0 0 0 0 0 0 2 2 0
    > 7 3 3 0 0 0 0 0 2 2 0
    > 8 3 0 3 0 0 3 3 0 2 0
    > 9 3 0 0 0 3 3 3 3 0 0
    > 10 2 0 0 0 0 0 0 0 0 0
    562,569c562,569
    < ..$ 2 : int 4
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int 4
    < ..$ 6 : int 4
    < ..$ 7 : int 4
    < ..$ 8 : int 4
    < ..$ 9 : logi NA
    ---
    > ..$ 2 : int 10
    > ..$ 3 : int 10
    > ..$ 4 : NULL
    > ..$ 5 : int 10
    > ..$ 6 : int 10
    > ..$ 7 : int 10
    > ..$ 8 : int 10
    > ..$ 9 : int 10
    573a574,585
    > ..$ 1 : int(0)
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
    > ..$ 7 : logi NA
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int(0)
    > ..$ 11: NULL
    > ..$ 12: NULL
    > $ 3 :List of 11
    575,576c587,588
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    ---
    > ..$ 2 : int 1
    > ..$ 4 : NULL
    580,582c592,594
    < ..$ 8 : int 1
    < ..$ 9 : int 1
    < ..$ 10: logi NA
    ---
    > ..$ 8 : logi NA
    > ..$ 9 : logi NA
    > ..$ 10: int 1
    585c597
    < $ 3 :List of 11
    ---
    > $ 4 :List of 11
    588c600
    < ..$ 4 : NULL
    ---
    > ..$ 3 : NULL
    597,608d608
    < $ 4 :List of 11
    < ..$ 1 : logi NA
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 5 : int(0)
    < ..$ 6 : logi NA
    < ..$ 7 : int(0)
    < ..$ 8 : logi NA
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    < ..$ 11: NULL
    < ..$ 12: NULL
    612,614c612,614
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    < ..$ 6 : logi NA
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    > ..$ 6 : int(0)
    617c617
    < ..$ 9 : int(0)
    ---
    > ..$ 9 : logi NA
    622,633d621
    < ..$ 1 : int [1:3] 2 4 5
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : logi NA
    < ..$ 7 : int [1:3] 2 4 5
    < ..$ 8 : int [1:3] 2 4 5
    < ..$ 9 : int [1:3] 2 4 5
    < ..$ 10: int [1:3] 2 4 5
    < ..$ 11: NULL
    < ..$ 12: NULL
    < $ 7 :List of 11
    636,637c624,625
    < ..$ 3 : NULL
    < ..$ 4 : int(0)
    ---
    > ..$ 3 : int(0)
    > ..$ 4 : NULL
    639,640c627,628
    < ..$ 6 : int(0)
    < ..$ 8 : int(0)
    ---
    > ..$ 7 : int(0)
    > ..$ 8 : logi NA
    642c630
    < ..$ 10: logi NA
    ---
    > ..$ 10: int(0)
    644a633,644
    > $ 7 :List of 11
    > ..$ 1 : logi NA
    > ..$ 2 : logi NA
    > ..$ 3 : int [1:2] 1 2
    > ..$ 4 : NULL
    > ..$ 5 : int [1:2] 1 2
    > ..$ 6 : int [1:2] 1 2
    > ..$ 8 : int [1:2] 1 2
    > ..$ 9 : int [1:2] 1 2
    > ..$ 10: int [1:2] 1 2
    > ..$ 11: NULL
    > ..$ 12: NULL
    647,654c647,654
    < ..$ 2 : int 1
    < ..$ 3 : NULL
    < ..$ 4 : int 1
    < ..$ 5 : int 1
    < ..$ 6 : int 1
    < ..$ 7 : int 1
    < ..$ 9 : logi NA
    < ..$ 10: logi NA
    ---
    > ..$ 2 : int [1:4] 1 3 6 7
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int [1:4] 1 3 6 7
    > ..$ 6 : logi NA
    > ..$ 7 : logi NA
    > ..$ 9 : int [1:4] 1 3 6 7
    > ..$ 10: int [1:4] 1 3 6 7
    659,663c659,663
    < ..$ 2 : int [1:4] 1 4 7 8
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:4] 1 4 7 8
    < ..$ 6 : int [1:4] 1 4 7 8
    ---
    > ..$ 2 : int [1:5] 1 5 6 7 8
    > ..$ 3 : int [1:5] 1 5 6 7 8
    > ..$ 4 : NULL
    > ..$ 5 : logi NA
    > ..$ 6 : logi NA
    666c666
    < ..$ 10: logi NA
    ---
    > ..$ 10: int [1:5] 1 5 6 7 8
    671,675c671,675
    < ..$ 2 : logi NA
    < ..$ 3 : NULL
    < ..$ 4 : logi NA
    < ..$ 5 : int [1:6] 1 2 4 7 8 9
    < ..$ 6 : int [1:6] 1 2 4 7 8 9
    ---
    > ..$ 2 : int(0)
    > ..$ 3 : logi NA
    > ..$ 4 : NULL
    > ..$ 5 : int(0)
    > ..$ 6 : int(0)
     Running ‘test_bicscore.R’
     Running ‘test_causalEffect.R’
     Running ‘test_compareGraphs.R’
     Running ‘test_dag2cpdag.R’
     Running ‘test_dag2essgraph.R’
     Running ‘test_displayAmat.R’
     Running ‘test_dsep.R’
     Running ‘test_fci.R’
     Running ‘test_fciPlus.R’
     Running ‘test_gSquareBin.R’
     Running ‘test_gSquareDis.R’
     Running ‘test_gac.R’
     Running ‘test_getNextSet.R’
     Running ‘test_gies.R’ [10s/11s]
     Running ‘test_ida.R’ [31m/39m]
     Running ‘test_idaFast.R’ [9s/11s]
     Running ‘test_isValidGraph.R’
     Running ‘test_jointIda.R’
     Running ‘test_mat2targets.R’
     Running ‘test_pc.R’
     Running ‘test_pcSelect.R’
     Running ‘test_pcalg2dagitty.R’
     Running ‘test_pcorOrder.R’
     Running ‘test_pdag2allDags.R’
     Running ‘test_pdag2dag.R’
     Running ‘test_possDeAn.R’
     Running ‘test_randDAG.R’
     Running ‘test_randomDAG.R’
     Running ‘test_rfci.R’
     Running ‘test_rmvDAG.R’
     Running ‘test_shd.R’
     Running ‘test_skeleton.R’ [11s/13s]
     Running ‘test_udag2pag.R’
     Running ‘test_udag2pdag.R’
     Running ‘test_wgtMatrix.R’
    Running the tests in ‘tests/test_ages.R’ failed.
    Complete output:
     > ## Test file ages
     > library(pcalg)
     > (doExtras <- pcalg:::doExtras())
     [1] FALSE
     >
     > ## Known example where ges and ages output a different result
     > bool3 <- TRUE
     > set.seed(77)
     >
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > data = rmvDAG(n, gGtrue)
     >
     > ## Estimate the aggregated PDAG with ages
     > ages.fit <- ages(data = data)
     >
     >
     > ## Estimate the essential graph with ges
     > score <- new("GaussL0penObsScore", data)
     > ges.fit <- ges(score)
     >
     > diff <- as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix")
     >
     > bool3 <- ( bool3 & (diff[6,2]==1) * (diff[8,2]==1) *(sum(abs( as(ges.fit$essgraph,"matrix") - as(ages.fit$essgraph,"matrix") ))==2) )
     > stopifnot(bool3)
     Error: bool3 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_causalEffect.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     >
     > ## eff 1->5: 0.305 + 0.354*0.495
     > trEff <- 0.305 + 0.354*0.495
     > estEff <- causalEffect(g, 5,1)
     >
     > if (!(round(trEff,3) == round(estEff, 3))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
    Running the tests in ‘tests/test_displayAmat.R’ failed.
    Complete output:
     > library(pcalg)
     > ##################################################
     > ## pcAlgo object
     > ##################################################
     > ## Load predefined data
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x)
     >
     > ## define sufficient statistics
     > suffStat <- list(C = cor(gmG8$x), n = n)
     > ## estimate CPDAG
     > skel.fit <- skeleton(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amSkel <- as(skel.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . 1 . 1
     Bar 1 . 1 . 1 . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . 1 . 1
     V6 1 . . . 1 . 1 .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > str(amSkel)
     'amat' num [1:8, 1:8] 0 1 0 0 0 1 0 1 1 0 ...
     - attr(*, "dimnames")=List of 2
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     ..$ : chr [1:8] "Author" "Bar" "Ctrl" "Goal" ...
     - attr(*, "type")= chr "cpdag"
     > stopifnot(attr(amSkel, "type") == "cpdag",
     + amSkel["Author", "Bar"] == 1,
     + amSkel["Bar", "Author"] == 1,
     + amSkel["Ctrl","Author"] == 0)
     >
     > pc.fit <- pc(suffStat, indepTest = gaussCItest,
     + alpha = 0.01, labels = V)
     > (amPC <- as(pc.fit, "amat"))
     Adjacency Matrix 'amat' (8 x 8) of type 'cpdag':
     Author Bar Ctrl Goal V5 V6 V7 V8
     Author . 1 . . . . . .
     Bar 1 . 1 . . . . .
     Ctrl . 1 . . . . . .
     Goal . . . . . . . .
     V5 . 1 . . . . . .
     V6 1 . . . 1 . . .
     V7 . . . . . 1 . .
     V8 1 . . . 1 . . .
     > stopifnot(attr(amPC, "type") == "cpdag",
     + amPC["V5", "V8"] == 0,
     + amPC["V8", "V5"] == 1,
     + amPC["Goal","Author"] == 0)
     >
     > ##################################################
     > ## fciAlgo object
     > ##################################################
     > set.seed(42)
     > p <- 7
     > ## generate and draw random DAG :
     > myDAG <- randomDAG(p, prob = 0.4)
     >
     > ## find PAG using the FCI algorithm
     > myC <- cov2cor(trueCov(myDAG))
     > suffStat <- list(C = myC, n = 10^9)
     > V <- LETTERS[1:p] ## labels of nodes
     >
     > fmFCI <- fci(suffStat, indepTest=gaussCItest, labels = V,
     + alpha = 0.9999, doPdsep = FALSE)
     > (amFCI <- as(fmFCI, "amat"))
     Adjacency Matrix 'amat' (7 x 7) of type 'pag':
     A B C D E F G
     A . 1 1 . . 2 1
     B 1 . 1 . . 2 1
     C 1 1 . . . 2 1
     D . . . . . . .
     E . . . . . 2 .
     F 1 1 1 . 1 . .
     G 1 1 1 . . . .
     > stopifnot(attr(amFCI, "type") == "pag",
     + amFCI["B","E"] == 2,
     + amFCI["C","D"] == 1,
     + amFCI["G","A"] == 3)
     Error: amFCI["B", "E"] == 2 is not TRUE
     Execution halted
    Running the tests in ‘tests/test_ida.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     > nreps <- 100
     > res <- logical(nreps)
     > all.eff.true <- res
     > Rnd <- function(e) round(e, 14)## get 14 digits accuracy, as we use true (DAG, cov)
     > for (i in 1:nreps) {
     + p <- 2 + rpois(1, lambda = 8) # ==> p >= 2, E[p] = 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.2)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + ## x != y in {1,2,...p} ;
     + xy <- sample.int(p, 2); x <- xy[1]; y <- xy[2]
     +
     + ## plot(myCPDAG)
     + eff.true <- Rnd(causalEffect(myDAG, y, x))
     + all.eff.true[i] <- eff.true
     + ## cat("x=",x," y=",y," eff=",eff.true,"\n")
     +
     + eff.est <- Rnd(ida(x,y, mcov, myCPDAG, method="local"))
     + res[i] <- (eff.true %in% eff.est)
     + }
     > cat('Time elapsed: ', (.pt <- proc.time()),"\n")
     Time elapsed: 6.598 0.551 8.606 0.015 0.062
     >
     > stem(all.eff.true)
    
     The decimal point is 1 digit(s) to the left of the |
    
     0 | 00000000000000000000000000000000000000000000000000000000000000000000+6
     1 | 778
     2 | 9
     3 |
     4 | 2
     5 | 338
     6 | 124
     7 | 08
     8 |
     9 | 6
    
     > if (!all(res)) stop("Test ida: True effects were not recovered!")
     >
     > ## *one* test for method="global" :
     > eff.g.est <- Rnd(ida(x,y, mcov, myCPDAG, method="global", verbose=TRUE))
    Running the tests in ‘tests/test_idaFast.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(43)
     > nreps <- 50
     > res <- matrix(FALSE, 3, nreps)
     > resF <- rep(FALSE, nreps)
     >
     > for (i in 1:nreps) {
     + if (i%%100 == 0) cat("i=",i,"\n")
     + set.seed(i)
     + p <- 10
     + ## generate and draw random DAG :
     + myDAG <- randomDAG(p, prob = 0.4)
     + myCPDAG <- dag2cpdag(myDAG)
     + mcov <- trueCov(myDAG)
     +
     + x <- sample(1:10,1)
     + y1 <- sample(setdiff(1:10,x),1)
     + y2 <- sample(setdiff(1:10,c(x,y1)),1)
     + y3 <- sample(setdiff(1:10,c(x,y1,y2)),1)
     + ## plot(myCPDAG)
     + eff.true1 <- round(causalEffect(myDAG, y1, x),14)
     + eff.true2 <- round(causalEffect(myDAG, y2, x),14)
     + eff.true3 <- round(causalEffect(myDAG, y3, x),14)
     + ## cat("x=",x," y1=",y1," eff=",eff.true1,"\n")
     + ## cat("x=",x," y1=",y2," eff=",eff.true2,"\n")
     +
     + (eff.est1 <- round(ida(x,y1,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est2 <- round(ida(x,y2,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.est3 <- round(ida(x,y3,mcov,myCPDAG,method="local",verbose=FALSE),14))
     + (eff.estF <- round(idaFast(x,c(y1,y2,y3),mcov,myCPDAG),14))
     +
     + res[1,i] <- (eff.true1 %in% eff.est1)
     + res[2,i] <- (eff.true2 %in% eff.est2)
     + res[3,i] <- (eff.true3 %in% eff.est3)
     +
     + resF[i] <- all(eff.estF == rbind(eff.est1,eff.est2,eff.est3))
     + }
     >
     > if (!all(res)) stop("Test idaFast: True effects were not recovered!")
     Error: Test idaFast: True effects were not recovered!
     Execution halted
    Running the tests in ‘tests/test_pcSelect.R’ failed.
    Complete output:
     > #### Testing pcSelect() _and_ (its main helper) mcor()
     > #### ~~~~~~~~ ~~~~
     >
     > library(pcalg)
     >
     > p <- 10
     > n <- 1000
     >
     > set.seed(101)
     > myDAG <- randomDAG(p, prob = 0.2)
     > d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     > y <- d.mat[,10]
     > dm <- d.mat[,-10]
     > res1 <- pcSelect(y,dm, alpha=0.05)
     > if (!all(res1$G == 1:9 %in% c(4,5,6)))
     + stop("Test of pcSelect: Consistency problem 101")
     Error: Test of pcSelect: Consistency problem 101
     Execution halted
    Running the tests in ‘tests/test_pcalg2dagitty.R’ failed.
    Complete output:
     > ## Translate amat as describes in amatType to dagitty object
     >
     > library(pcalg)
     > library(dagitty)
    
     Attaching package: 'dagitty'
    
     The following object is masked from 'package:pcalg':
    
     randomDAG
    
     > doExtras <- pcalg:::doExtras()
     >
     > res <- rep(FALSE, 10)
     > ####################
     > ## Test DAG 1
     > ####################
     > data(gmG)
     > n <- nrow (gmG8$x)
     > V <- colnames(gmG8$x) # labels aka node names
     >
     > amat <- wgtMatrix(gmG8$g)
     > amat[amat != 0] <- 1
     > dagitty_dag1 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(gmG8$g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag1))
     >
     > res[1] <- (dagitty_dag1 == "dag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -> Bar\nAuthor -> V6\nAuthor -> V8\nBar -> Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > #############
     > ## Test DAG 2
     > #############
     > set.seed(123)
     > p <- 10
     > V <- sample(LETTERS, p)
     > g <- pcalg::randomDAG(p,prob=0.3, V = V)
     >
     > amat <- wgtMatrix(g)
     > amat[amat != 0] <- 1
     > dagitty_dag2 <- pcalg2dagitty(amat,V,type="dag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow=c(1,2))
     > ## plot(g, main = "True DAG")
     > ## plot(dagitty:::graphLayout(dagitty_dag2))
     >
     > res[2] <- (dagitty_dag2 == "dag {\nA\nH\nJ\nK\nQ\nT\nU\nW\nX\nZ\nA -> Q\nH -> A\nH -> K\nH -> Q\nH -> T\nH -> Z\nJ -> W\nT -> A\nT -> Q\nT -> X\nU -> Q\nU -> W\nU -> X\nW -> K\n}\n")
     >
     > ###############
     > ## Test CPDAG 1
     > ###############
     > data(gmG)
     > n <- nrow(gmG8$ x)
     > V <- colnames(gmG8$ x) # labels aka node names
     >
     > ## estimate CPDAG
     > pc.fit <- pc(suffStat = list(C = cor(gmG8$x), n = n),
     + indepTest = gaussCItest, ## indep.test: partial correlations
     + alpha=0.01, labels = V, verbose = FALSE)
     > amat <- as(pc.fit, "amat")
     > dagitty_cpdag1 <- pcalg2dagitty(amat,V,type="cpdag")
     > ## Use dagitty:::graphLayout instead of just graphLayout
     > ## because Rgraphviz package that R uses has a function w the same name
     > ## par(mfrow = c(1,2))
     > ## plot(pc.fit)
     > ## plot(dagitty:::graphLayout(dagitty_cpdag1))
     >
     > res[3] <- (dagitty_cpdag1 == "pdag {\nAuthor\nBar\nCtrl\nGoal\nV5\nV6\nV7\nV8\nAuthor -- Bar\nAuthor -> V6\nAuthor -> V8\nBar -- Ctrl\nBar -> V5\nV5 -> V6\nV5 -> V8\nV6 -> V7\n}\n")
     >
     > stopifnot(all(res[1:3]))
     Error: all(res[1:3]) is not TRUE
     Execution halted
    Running the tests in ‘tests/test_randDAG.R’ failed.
    Complete output:
     > library(pcalg)
     > ## setwd("/sfs/u/kalischm/research/packages/unifDAGs/")
     > ## source("aux_general.R")
     > ## source("randDAG.R")
     >
     > ### Check all methods: ----------------------------------------------
     >
     > ## MM hack: extract them from the randDAG() function definition
     > body. <- body(randDAG)
     > is.switch <- function(P) !is.symbol(P) && identical(as.symbol("switch"), P[[1]])
     > switchCall <- body.[vapply(body., is.switch, NA)][[1]]
     > stopifnot(identical(as.symbol("switch"), switchCall[[1]]))
     > (rDAGmeths <- names(switchCall)[-c(1:2, length(switchCall))])
     [1] "er" "regular" "watts" "bipartite" "barabasi" "geometric"
     [7] "power" "interEr"
     > rDAGall <- function(n, d, ...)
     + sapply(rDAGmeths, function(meth) randDAG(n,d, method=meth, ...),
     + simplify=FALSE)
     > set.seed(37)
     > rD.10.4 <- rDAGall(10, 4)
     > ## with a low-level warning
     > rD.10.4 # looks ok
     $er
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $regular
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $watts
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 20
    
     $bipartite
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     $barabasi
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 19
    
     $geometric
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $power
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 23
    
     $interEr
     A graphNEL graph with directed edges
     Number of Nodes = 10
     Number of Edges = 21
    
     >
     > ok <- suppressPackageStartupMessages(
     + require("graph"))
     > stopifnot(ok)
     >
     > stopifnot(vapply(rD.10.4, isDirected, NA))
     >
     > stopifnot(identical(
     + lapply(rD.10.4, leaves, "out"),
     + list(er = "3", regular = c("1", "5", "6"), watts = c("3", "4", "6"),
     + bipartite = c("1", "2", "5"), barabasi = c("4", "8"),
     + geometric = c("4", "7"), power = c("4", "5", "9"),
     + interEr = c("3", "7"))
     + ))
     Error: identical(lapply(rD.10.4, leaves, "out"), list(er = "3", regular = c("1", .... is not TRUE
     Execution halted
    Running the tests in ‘tests/test_rmvDAG.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(100)
     >
     > wmat <- rbind(c(0,1,0,0,0),
     + c(0,0,0,1,0),
     + c(0,0,0,1,0),
     + c(0,0,0,0,1),
     + c(0,0,0,0,0))
     > colnames(wmat) <- rownames(wmat) <- c("1","2","3","4","5")
     > print.table(wmat, zero.print=".")
     1 2 3 4 5
     1 . 1 . . .
     2 . . . 1 .
     3 . . . 1 .
     4 . . . . 1
     5 . . . . .
     >
     > g <- as(wmat,"graphNEL")
     >
     > e.true <- 0
     > var.true <- 5
     >
     > dat <- rmvDAG(1000,g)
     > x5 <- dat[,5]
     >
     > ## test mean
     > if (t.test(x5,alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Mean not correct!")
     + }
     >
     > ## test variance
     > if (var.test(x5,rnorm(1000,0,sqrt(5)),ratio=1,
     + alternative="two.sided")$p.value<0.05) {
     + stop("Test of rmvDAG: Variance not correct!")
     + }
     >
     > ###----- Check gmG generation: ---> ../man/gmG.Rd
     >
     > ## Used to generate "gmG"
     > set.seed(40)
     > p <- 8
     > n <- 5000
     > ## true DAG:
     > vars <- c("Author", "Bar", "Ctrl", "Goal", paste0("V",5:8))
     > gGtrue <- randomDAG(p, prob = 0.3, V = vars)
     > x <- rmvDAG(n, gGtrue, back.compatible=TRUE)
     >
     > data(gmG)
     >
     > ## gmG, gmI were produced on 64-bit -> very small difference even in weights:
     > stopifnot(all.equal(gGtrue, gmG$g, tol=6e-16),
     + all.equal(x, gmG$ x, tol=1e-15))
     Error: gGtrue and gmG$g are not equal:
     Attributes: < Component "edgeData": Names: 7 string mismatches >
     Attributes: < Component "edgeData": Attributes: < Component "data": Names: 7 string mismatches > >
     Attributes: < Component "edgeData": Attributes: < Component "data": Component "Author|V8": Component "weight": Mean relative difference: 0.4651165 > >
     ....
     Execution halted
    Running the tests in ‘tests/test_shd.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(123)
     >
     > ## expl 1
     > g1 <- randomDAG(5,0.5)
     > g2 <- randomDAG(5,0.5)
     > res1 <- (shd(g1,g2)==4)
     >
     > ## expl 2
     > g3 <- dag2cpdag(g1)
     > res2 <- (shd(g3,g1)==3)
     >
     > if(!all(c(res1,res2))) {
     + stop("Test of shd: Theoretical value not matched!")
     + }
     Error: Test of shd: Theoretical value not matched!
     Execution halted
    Running the tests in ‘tests/test_udag2pdag.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > .libPaths()
     [1] "/tmp/RtmpS5aWag/RLIBS_c065dea50a0" "/home/ripley/R/cc/library"
     > ## acyclic graphs
     >
     > nreps <- 30
     > p <- 8
     > n <- 1000
     >
     > for(u2pd in c("rand", "retry", "relaxed")) {
     + cat("\n u2pd =", u2pd, "\n ------------\n")
     + cyc.res <- logical(nreps)
     + for (i in 1:nreps) {
     + set.seed(i)
     + myDAG <- randomDAG(p, prob = 0.2)
     + d.mat <- rmvDAG(n, myDAG, errDist = "normal")
     + res <- suppressWarnings(pcAlgo(d.mat, alpha = 0.05, directed=TRUE, u2pd = u2pd))
     + ## ------ directed; u2pd = "rand" --> udag2pdag()
     + res.A <- wgtMatrix(res@graph)
     + res.A[res.A!=0] <- 1
     + undir.A <- res.A + t(res.A)
     + undir.A[undir.A==1] <- 0
     + undir.A[undir.A==2] <- 1
     + res.dir <- res.A - undir.A
     + cyc.res[i] <- ggm::isAcyclic(res.dir)
     + }
     + if (!all(cyc.res)) stop("Test of pcAlgo(*, directed): Cyclic part in PDAG!")
     + } ## for(u2pd ...)
    
     u2pd = rand
     ------------
    
     u2pd = retry
     ------------
    
     u2pd = relaxed
     ------------
     Error: Test of pcAlgo(*, directed): Cyclic part in PDAG!
     Execution halted
    Running the tests in ‘tests/test_wgtMatrix.R’ failed.
    Complete output:
     > library(pcalg)
     >
     > set.seed(42)
     >
     > ## wmat_ij is edge from j to i
     > g <- randomDAG(3,0.4)
     > wmat <- wgtMatrix(g)
     > if (!(wmat[2,1]!=0 & wmat[1,2]==0 & wmat[3,1]!=0 & wmat[3,2]==0)) {
     + stop("Test of wgtMatrix: Something with orientation of edges is wrong!")
     + }
     >
     > ## test weird parameters
     > g <- randomDAG(3,0)
     > wmat <- wgtMatrix(g)
     > if (!all(wmat==matrix(0,3,3))) {
     + stop("Test of wgtMatrix: Problem when used on empty graph!")
     + }
     >
     > ## test if weight parameters are correct
     > set.seed(34)
     > g <- randomDAG(5,0.8)
     > trMat <- matrix(0, 5,5)
     > trMat[1,5] <- 0.305
     > trMat[1,4] <- 0.863
     > trMat[1,2] <- 0.354
     > trMat[2,4] <- 0.392
     > trMat[2,5] <- 0.495
     > trMat[3,4] <- 0.278
     >
     > if (!all(round(wgtMatrix(g),3) == t(trMat))) {
     + stop("Test in wgtMatrix: Weights have wrong value!")
     + }
     Error: Test in wgtMatrix: Weights have wrong value!
     Execution halted
Flavor: r-patched-solaris-x86