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

> ### Name: tableRuns
> ### Title: Function to retrieve most common runs in the population
> ### Aliases: tableRuns
> 
> ### ** Examples
> 
> # getting map and ped paths
> genotypeFile <- system.file("extdata", "Kijas2016_Sheep_subset.ped", package = "detectRUNS")
> mapFile <- system.file("extdata", "Kijas2016_Sheep_subset.map", package = "detectRUNS")
> 
> # calculating runs of Homozygosity
> ## Not run: 
> ##D # skipping runs calculation
> ##D runs <- slidingRUNS.run(genotypeFile, mapFile, windowSize = 15, threshold = 0.1,  minSNP = 15,
> ##D ROHet = FALSE,  maxOppositeGenotype = 1, maxMiss = 1,  minLengthBps = 100000,  minDensity = 1/10000)
> ## End(Not run)
> # loading pre-calculated data
> runsFile <- system.file("extdata", "Kijas2016_Sheep_subset.sliding.csv", package="detectRUNS")
> runsDF = readExternalRuns(inputFile = runsFile, program = 'detectRUNS')
Loading file from detectRUNS
> 
> tableRuns(runs = runsDF, genotypeFile = genotypeFile, mapFile = mapFile, threshold = 0.5)
Threshold used: 50
I found only Runs data frame. GOOD!
Calculation % SNP in ROH
Chromosome founds:  2

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |======================================================================| 100%
Calculation % SNP in ROH finish
checking:  Jacobs
checking:  Navajo-Churro
    Group        Start_SNP          End_SNP chrom nSNP      from        to
1  Jacobs   OAR2_2415898.1   OAR2_2415898.1     2    1   4166902   4166902
2  Jacobs  OAR2_58221964.1  OAR2_58845032.1     2   13  54135888  54687816
3  Jacobs         s63709.1  OAR2_76435176.1     2   19  70664942  71739429
4  Jacobs  OAR2_77896643.1  OAR2_78825486.1     2   16  73109758  73926990
5  Jacobs OAR2_130215973.1 OAR2_131783123.1     2   24 121796989 123573014
6  Jacobs OAR2_227848218.1         s09037.1     2    6 215443702 215641893
7  Jacobs         s52064.1 OAR2_229781196.1     2    7 215844761 217457102
8  Jacobs         s72964.1         s53910.1     2   18 217719922 219015064
9  Jacobs         s50915.1 OAR2_232672067.1     2    2 220083076 220103004
10 Jacobs         s07830.1         s41614.1    24   12  16041579  17133716
> 
> 
> 
> 
> ### * <FOOTER>
> ###
> cleanEx()
Error in apply(sC[, 1:2], 1, function(x) paste0("\t", x[1], " (", x[2],  : 
  dim(X) must have a positive length
Calls: cleanEx
Execution halted