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

> ### Name: idaFast
> ### Title: Multiset of Possible Total Causal Effects for Several Target
> ###   Var.s
> ### Aliases: idaFast
> ### Keywords: multivariate models graphs
> 
> ### ** Examples
> 
> ## Simulate the true DAG
> set.seed(123)
> p <- 7
> myDAG <- randomDAG(p, prob = 0.2) ## true DAG
> myCPDAG <- dag2cpdag(myDAG) ## true CPDAG
> covTrue <- trueCov(myDAG) ## true covariance matrix
> 
> ## simulate data from the true DAG
> n <- 10000
> dat <- rmvDAG(n, myDAG)
> cov.d <- cov(dat)
> 
> ## estimate CPDAG (see help on the function "pc")
> suffStat <- list(C = cor(dat), n = n)
> pc.fit <- pc(suffStat, indepTest = gaussCItest, alpha = 0.01, p=p)
> 
> if(require(Rgraphviz)) {
+   op <- par(mfrow=c(1,3))
+   plot(myDAG,        main="true DAG")
+   plot(myCPDAG,      main="true CPDAG")
+   plot(pc.fit@graph, main="pc()-estimated CPDAG")
+   par(op)
+ }
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
Error in plot.new() : write failed
Calls: plot ... plot -> .local -> plot -> plot -> .local -> plot.new
Execution halted
Error: internal read error in PDF_endpage
Fatal error: error during cleanup