Running examples in ‘SpaCCr-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: MethyRegionPlot
> ### Title: Plots methylation data by Genomic Coordinates for a given
> ###   chromosomal region with cluster means overlayed for each subject.
> ### Aliases: MethyRegionPlot
> 
> ### ** Examples
> 
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> library(tidyr)
> data("methy")
> methy <- methy[1:20,1:10]
> Coordinates <- methy$Genomic_Coordinate
> methy %>%
+  tbl_df() %>%
+  select(-Chromosome,-Genomic_Coordinate) %>%
+  gather(Subject,Value,-ProbeID) %>%
+  spread(ProbeID,Value) -> X
> SubjectLabels <- X$Subject
> X <- X[,-1] %>% as.matrix()
> nsubj <- nrow(X)
> nprobes <- ncol(X)
> nweights <- choose(nprobes,2)
> diff.vals <- diff(Coordinates)
> too.far <- diff.vals > 20000
> sig = 1/5e3
> w.values <- exp(-sig*diff.vals)
> w.values[too.far] = 0
> 
> verbose=TRUE
> tol.base = 1e-4
> tol.miss = 1e-4
> max.iter.base=5000
> max.iter.miss=500
> ngam = 20
> gamma.seq <- exp(seq(log(1e-1),log(1e1),length.out=ngam))
> CVRes <- SpaCC_CV(X=t(scale(t(X),center=TRUE,scale=FALSE)),
+                  w=w.values,
+                  gamma.seq=gamma.seq,
+                  nfolds=5,
+                  nu=1/nsubj,
+                  verbose=TRUE,
+                  tol.base=tol.base,
+                  tol.miss=tol.miss,
+                  max.iter.base=max.iter.base,
+                  max.iter.miss=max.iter.miss,
+                  parallel=FALSE,frac = .1)
[1] "Fold # 1 of 5"
[1] "Solving Path Problem 3"
[1] "gamma iter is: 1"
[1] "Miss Iter 360"
[1] "Missing Error: 9.97024509353353e-05"
[1] "gamma iter is: 2"
[1] "Miss Iter 359"
[1] "Missing Error: 9.94652970480159e-05"
[1] "gamma iter is: 3"
[1] "Miss Iter 350"
[1] "Missing Error: 9.95259306541247e-05"
[1] "gamma iter is: 4"
[1] "Miss Iter 338"
[1] "Missing Error: 9.99888431397538e-05"
[1] "gamma iter is: 5"
[1] "Miss Iter 325"
[1] "Missing Error: 9.93760015930872e-05"
[1] "gamma iter is: 6"
[1] "Miss Iter 127"
[1] "Missing Error: 9.86915622436735e-05"
[1] "gamma iter is: 7"
[1] "Miss Iter 66"
[1] "Missing Error: 9.96681201524866e-05"
[1] "gamma iter is: 8"
[1] "Miss Iter 76"
[1] "Missing Error: 9.81035285505419e-05"
[1] "gamma iter is: 9"
[1] "Miss Iter 47"
[1] "Missing Error: 9.75419506645971e-05"
[1] "gamma iter is: 10"
[1] "Miss Iter 28"
[1] "Missing Error: 9.17880027853063e-05"
[1] "gamma iter is: 11"
[1] "Miss Iter 22"
[1] "Missing Error: 8.55288854894172e-05"
[1] "gamma iter is: 12"
[1] "Miss Iter 24"
[1] "Missing Error: 9.62832932915321e-05"
[1] "gamma iter is: 13"
[1] "Miss Iter 21"
[1] "Missing Error: 9.23948243363875e-05"
[1] "gamma iter is: 14"
[1] "Miss Iter 17"
[1] "Missing Error: 8.98207674688374e-05"
[1] "gamma iter is: 15"
[1] "Miss Iter 14"
[1] "Missing Error: 9.51706354004862e-05"
[1] "gamma iter is: 16"
[1] "Miss Iter 14"
[1] "Missing Error: 8.40138897058863e-05"
[1] "gamma iter is: 17"
[1] "Miss Iter 14"
[1] "Missing Error: 8.30839738253671e-05"
[1] "gamma iter is: 18"
[1] "Miss Iter 15"
[1] "Missing Error: 7.85526522067256e-05"
[1] "gamma iter is: 19"
[1] "Miss Iter 16"
[1] "Missing Error: 8.78268585370885e-05"
[1] "gamma iter is: 20"
[1] "Miss Iter 22"
[1] "Missing Error: 7.27329289172779e-05"
[1] "Computing Error"
[1] "Fold # 2 of 5"
[1] "Solving Path Problem 3"
[1] "gamma iter is: 1"
[1] "Miss Iter 354"
[1] "Missing Error: 9.91314932430507e-05"
[1] "gamma iter is: 2"
[1] "Miss Iter 351"
[1] "Missing Error: 9.92198003272683e-05"
[1] "gamma iter is: 3"
[1] "Miss Iter 344"
[1] "Missing Error: 9.9759446822974e-05"
[1] "gamma iter is: 4"
[1] "Miss Iter 331"
[1] "Missing Error: 9.94993786822753e-05"
[1] "gamma iter is: 5"
[1] "Miss Iter 288"
[1] "Missing Error: 9.80841545450869e-05"
[1] "gamma iter is: 6"
[1] "Miss Iter 75"
[1] "Missing Error: 9.98226297637264e-05"
[1] "gamma iter is: 7"
[1] "Miss Iter 69"
[1] "Missing Error: 9.9577615111112e-05"
[1] "gamma iter is: 8"
[1] "Miss Iter 71"
[1] "Missing Error: 9.79660265785486e-05"
[1] "gamma iter is: 9"
[1] "Miss Iter 50"
[1] "Missing Error: 9.93933367570533e-05"
[1] "gamma iter is: 10"
[1] "Miss Iter 28"
[1] "Missing Error: 9.75406007836012e-05"
[1] "gamma iter is: 11"
[1] "Miss Iter 27"
[1] "Missing Error: 9.94068581556288e-05"
[1] "gamma iter is: 12"
[1] "Miss Iter 25"
[1] "Missing Error: 7.39947286565004e-05"
[1] "gamma iter is: 13"
[1] "Miss Iter 24"
[1] "Missing Error: 8.93195761810699e-05"
[1] "gamma iter is: 14"
[1] "Miss Iter 25"
[1] "Missing Error: 6.05440412543363e-05"
[1] "gamma iter is: 15"
[1] "Miss Iter 27"
[1] "Missing Error: 7.5967948318595e-05"
[1] "gamma iter is: 16"
[1] "Miss Iter 34"
[1] "Missing Error: 9.77951477913904e-05"
[1] "gamma iter is: 17"
[1] "Miss Iter 44"
[1] "Missing Error: 9.15472428838252e-05"
[1] "gamma iter is: 18"
[1] "Miss Iter 55"
[1] "Missing Error: 9.34741909074375e-05"
[1] "gamma iter is: 19"
[1] "Miss Iter 68"
[1] "Missing Error: 9.37724358137172e-05"
[1] "gamma iter is: 20"
[1] "Miss Iter 83"
[1] "Missing Error: 9.54720568230448e-05"
[1] "Computing Error"
[1] "Fold # 3 of 5"
[1] "Solving Path Problem 2"
[1] "gamma iter is: 1"
[1] "Miss Iter 354"
[1] "Missing Error: 9.90855810834281e-05"
[1] "gamma iter is: 2"
[1] "Miss Iter 346"
[1] "Missing Error: 9.97040627892524e-05"
[1] "gamma iter is: 3"
[1] "Miss Iter 337"
[1] "Missing Error: 9.92562319630668e-05"
[1] "gamma iter is: 4"
[1] "Miss Iter 332"
[1] "Missing Error: 9.91853967011801e-05"
[1] "gamma iter is: 5"
[1] "Miss Iter 294"
[1] "Missing Error: 9.95815752801017e-05"
[1] "gamma iter is: 6"
[1] "Miss Iter 95"
[1] "Missing Error: 9.8993227896415e-05"
[1] "gamma iter is: 7"
[1] "Miss Iter 75"
[1] "Missing Error: 9.93698326152031e-05"
[1] "gamma iter is: 8"
[1] "Miss Iter 62"
[1] "Missing Error: 9.98202292362822e-05"
[1] "gamma iter is: 9"
[1] "Miss Iter 43"
[1] "Missing Error: 9.87094688060732e-05"
[1] "gamma iter is: 10"
[1] "Miss Iter 43"
[1] "Missing Error: 9.6726097935391e-05"
[1] "gamma iter is: 11"
[1] "Miss Iter 36"
[1] "Missing Error: 9.3951955366243e-05"
[1] "gamma iter is: 12"
[1] "Miss Iter 30"
[1] "Missing Error: 9.73819237767623e-05"
[1] "gamma iter is: 13"
[1] "Miss Iter 22"
[1] "Missing Error: 8.98244006678867e-05"
[1] "gamma iter is: 14"
[1] "Miss Iter 18"
[1] "Missing Error: 9.33415269042833e-05"
[1] "gamma iter is: 15"
[1] "Miss Iter 27"
[1] "Missing Error: 8.00849402053349e-05"
[1] "gamma iter is: 16"
[1] "Miss Iter 35"
[1] "Missing Error: 9.23549566908844e-05"
[1] "gamma iter is: 17"
[1] "Miss Iter 45"
[1] "Missing Error: 8.96245916925132e-05"
[1] "gamma iter is: 18"
[1] "Miss Iter 56"
[1] "Missing Error: 9.31550552095585e-05"
[1] "gamma iter is: 19"
[1] "Miss Iter 69"
[1] "Missing Error: 9.54185005883794e-05"
[1] "gamma iter is: 20"
[1] "Miss Iter 84"
[1] "Missing Error: 9.79782421224248e-05"
[1] "Computing Error"
[1] "Fold # 4 of 5"
[1] "Solving Path Problem 2"
[1] "gamma iter is: 1"
[1] "Miss Iter 253"
[1] "Missing Error: 9.95624926567513e-05"
[1] "gamma iter is: 2"
[1] "Miss Iter 241"
[1] "Missing Error: 9.98244635942039e-05"
[1] "gamma iter is: 3"
[1] "Miss Iter 232"
[1] "Missing Error: 9.98929522072975e-05"
[1] "gamma iter is: 4"
[1] "Miss Iter 226"
[1] "Missing Error: 9.92660903143897e-05"
[1] "gamma iter is: 5"
[1] "Miss Iter 47"
[1] "Missing Error: 9.8115453207259e-05"
[1] "gamma iter is: 6"
[1] "Miss Iter 59"
[1] "Missing Error: 9.9810789558897e-05"
[1] "gamma iter is: 7"
[1] "Miss Iter 74"
[1] "Missing Error: 9.81951430613767e-05"
[1] "gamma iter is: 8"
[1] "Miss Iter 67"
[1] "Missing Error: 9.99924133711643e-05"
[1] "gamma iter is: 9"
[1] "Miss Iter 56"
[1] "Missing Error: 9.72139551942038e-05"
[1] "gamma iter is: 10"
[1] "Miss Iter 25"
[1] "Missing Error: 9.45875211394519e-05"
[1] "gamma iter is: 11"
[1] "Miss Iter 22"
[1] "Missing Error: 9.44353210455807e-05"
[1] "gamma iter is: 12"
[1] "Miss Iter 20"
[1] "Missing Error: 9.67076409986927e-05"
[1] "gamma iter is: 13"
[1] "Miss Iter 18"
[1] "Missing Error: 9.32070416499043e-05"
[1] "gamma iter is: 14"
[1] "Miss Iter 14"
[1] "Missing Error: 9.06382208213549e-05"
[1] "gamma iter is: 15"
[1] "Miss Iter 15"
[1] "Missing Error: 8.47703138725733e-05"
[1] "gamma iter is: 16"
[1] "Miss Iter 20"
[1] "Missing Error: 8.07512020623977e-05"
[1] "gamma iter is: 17"
[1] "Miss Iter 26"
[1] "Missing Error: 8.04672212715082e-05"
[1] "gamma iter is: 18"
[1] "Miss Iter 32"
[1] "Missing Error: 9.3710119508033e-05"
[1] "gamma iter is: 19"
[1] "Miss Iter 40"
[1] "Missing Error: 9.02575167855709e-05"
[1] "gamma iter is: 20"
[1] "Miss Iter 49"
[1] "Missing Error: 9.12421889525245e-05"
[1] "Computing Error"
[1] "Fold # 5 of 5"
[1] "Solving Path Problem 2"
[1] "gamma iter is: 1"
[1] "Miss Iter 373"
[1] "Missing Error: 9.9895937290476e-05"
[1] "gamma iter is: 2"
[1] "Miss Iter 373"
[1] "Missing Error: 9.9895937290476e-05"
[1] "gamma iter is: 3"
[1] "Miss Iter 368"
[1] "Missing Error: 9.94391109860569e-05"
[1] "gamma iter is: 4"
[1] "Miss Iter 360"
[1] "Missing Error: 9.96161267255985e-05"
[1] "gamma iter is: 5"
[1] "Miss Iter 208"
[1] "Missing Error: 9.91381465699466e-05"
[1] "gamma iter is: 6"
[1] "Miss Iter 99"
[1] "Missing Error: 9.87807874620879e-05"
[1] "gamma iter is: 7"
[1] "Miss Iter 80"
[1] "Missing Error: 9.88947407985761e-05"
[1] "gamma iter is: 8"
[1] "Miss Iter 80"
[1] "Missing Error: 9.93120549606023e-05"
[1] "gamma iter is: 9"
[1] "Miss Iter 47"
[1] "Missing Error: 9.74431337239178e-05"
[1] "gamma iter is: 10"
[1] "Miss Iter 19"
[1] "Missing Error: 9.72053258995194e-05"
[1] "gamma iter is: 11"
[1] "Miss Iter 19"
[1] "Missing Error: 9.90659486234137e-05"
[1] "gamma iter is: 12"
[1] "Miss Iter 20"
[1] "Missing Error: 9.66559292940693e-05"
[1] "gamma iter is: 13"
[1] "Miss Iter 19"
[1] "Missing Error: 9.02087498124394e-05"
[1] "gamma iter is: 14"
[1] "Miss Iter 18"
[1] "Missing Error: 9.59860658998555e-05"
[1] "gamma iter is: 15"
[1] "Miss Iter 17"
[1] "Missing Error: 8.15784632231001e-05"
[1] "gamma iter is: 16"
[1] "Miss Iter 17"
[1] "Missing Error: 6.30407395845791e-05"
[1] "gamma iter is: 17"
[1] "Miss Iter 14"
[1] "Missing Error: 8.75709161840159e-05"
[1] "gamma iter is: 18"
[1] "Miss Iter 13"
[1] "Missing Error: 8.23349264983204e-05"
[1] "gamma iter is: 19"
[1] "Miss Iter 11"
[1] "Missing Error: 6.65011274550028e-05"
[1] "gamma iter is: 20"
[1] "Miss Iter 11"
[1] "Missing Error: 8.05068187783631e-05"
[1] "Computing Error"
> PlotCV(CVRes$ErrMat,gamma.seq = CVRes$gamma.seq,rule = 1)
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... lapply -> FUN -> push.vp.viewport -> grid.Call.graphics
Execution halted