Running examples in 'SCCI-Ex.R' failed
The error most likely occurred in:

> ### Name: pSCCI
> ### Title: Stochastic Complexity-based Conditional Independence Criterium
> ###   (p-value)
> ### Aliases: pSCCI
> 
> ### ** Examples
> 
> set.seed(1)
> x = round((runif(1000, min=0, max=5)))
> y = round((runif(1000, min=0, max=5)))
> Z = data.frame(round((runif(1000, min=0, max=5))), round((runif(1000, min=0, max=5))))
> ## create data matrix
> data_matrix = as.matrix(data.frame(x,y,S1=Z[,1], S2=Z[,2]))
> suffStat = list(dm=data_matrix)
> pSCCI(x=1,y=2,S=c(3,4),suffStat=suffStat)	## 0.01000001
[1] 0.01000001
> 
> ### Using SCI within the PC algorithm
> if(require(pcalg)){
+   ## Load data
+   data(gmD)
+   V <- colnames(gmD$x)
+   ## define sufficient statistics
+   suffStat <- list(dm = gmD$x, nlev = c(3,2,3,4,2), adaptDF = FALSE)
+   ## estimate CPDAG
+   pc.D <- pc(suffStat,
+             ## independence test: SCCI using fNML
+             indepTest = pSCCI, alpha = 0.01, labels = V, verbose = TRUE)
+ }
Loading required package: pcalg
Order=0; remaining edges:20
x= 1  y= 2  S=  : pval = 0.01000001 
x= 1  y= 3  S=  : pval = 0.009214604 
x= 1  y= 4  S=  : pval = 0.01000001 
x= 1  y= 5  S=  : pval = 0.01000001 
x= 2  y= 3  S=  : pval = 0.009897158 
x= 2  y= 4  S=  : pval = 0.009828555 
x= 2  y= 5  S=  : pval = 0.01000001 
x= 3  y= 1  S=  : pval = 0.009214604 
x= 3  y= 2  S=  : pval = 0.009897158 
x= 3  y= 4  S=  : pval = 0.01000001 
x= 3  y= 5  S=  : pval = 0.01000001 
x= 4  y= 2  S=  : pval = 0.009828555 
x= 4  y= 5  S=  : pval = 0.009488683 
x= 5  y= 4  S=  : pval = 0.009488683 
Order=1; remaining edges:8
x= 2  y= 3  S= 4 : pval = 0.009914776 
x= 2  y= 4  S= 3 : pval = 0.009846043 
x= 3  y= 1  S= 2 : pval = 0.009210859 
x= 3  y= 2  S= 1 : pval = 0.009893267 
x= 4  y= 2  S= 5 : pval = 0.0097279 
x= 4  y= 5  S= 2 : pval = 0.009391509 
> if (require(pcalg) & require(Rgraphviz)) {
+   ## show estimated CPDAG
+   par(mfrow = c(1,2))
+   plot(pc.D, main = "Estimated CPDAG")
+   plot(gmD$g, main = "True DAG")
+ }
Loading required package: Rgraphviz
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: grid
Warning: multiple methods tables found for 'plot'
Error in as.double(y) : 
  cannot coerce type 'S4' to vector of type 'double'
Calls: plot ... <Anonymous> -> <Anonymous> -> plot.default -> xy.coords
Execution halted