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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: as.DNAcopy.CBS
> ### Title: Coerces a CBS object to a DNAcopy object
> ### Aliases: as.DNAcopy.CBS CBS.as.DNAcopy as.DNAcopy,CBS-method
> ### Keywords: internal methods
> 
> ### ** Examples
> 
>  
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Simulating copy-number data
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> set.seed(0xBEEF)
> 
> # Number of loci
> J <- 1000
> 
> mu <- double(J)
> mu[200:300] <- mu[200:300] + 1
> mu[350:400] <- NA # centromere
> mu[650:800] <- mu[650:800] - 1
> eps <- rnorm(J, sd=1/2)
> y <- mu + eps
> x <- sort(runif(length(y), max=length(y))) * 1e5
> w <- runif(J)
> w[650:800] <- 0.001
> 
> 
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # Segmentation
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> fit <- segmentByCBS(y, x=x)
> print(fit)
  sampleName chromosome       start      end nbrOfLoci    mean
1       <NA>          0    55167.82 20774251       201  0.0164
2       <NA>          0 20774250.85 29320105        99  1.0474
3       <NA>          0 29320104.86 65874675       298 -0.0203
4       <NA>          0 65874675.06 81348129       151 -1.0813
5       <NA>          0 81348129.20 99910827       200 -0.0612
> plotTracks(fit)
Warning in plotTracks.CBS(fit) :
  Setting default 'Clim' assuming the signal type is ‘ratio’ because signalType(fit) is unknown (‘NA’). Use signalType(fit) <- ‘ratio’ to avoid this warning.
> 
> 
>  
> # Coerce an CBS object to a DNAcopy object
> fitD <- as.DNAcopy(fit)
> 
> # Coerce an DNAcopy object to a CBS object
> fitC <- as.CBS(fitD)
> 
> # Sanity check
> fitD2 <- as.DNAcopy(fit)
> stopifnot(all.equal(fitD2, fitD))
> 
> fitC2 <- as.CBS(fitD2)
> stopifnot(all.equal(fitC2, fitC))
Error in all.equal(fitC2, fitC) : replacement has 1 row, data has 0
Calls: stopifnot ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted