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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: matings
> ### Title: Mate Allocation
> ### Aliases: matings
> 
> ### ** Examples
> 
> 
> data("map")
> data("Cattle")
> dir   <- system.file("extdata", package = "optiSel")
> files <- paste(dir, "/Chr", 1:2, ".phased", sep="")
> 
> sKin  <- segIBD(files, map, minSNP=20, minL=2.0)
Using  skip = 2 
Using cskip = 2 
Reading chromosome 1 ...M=400
Reading chromosome 2 ...M=400
> Phen  <- Cattle[Cattle$Breed=="Angler", ]
> 
> cont  <- data.frame(
+   age   = c(   1,    2,    3,    4,    5,    6), 
+   male  = c(0.11, 0.11, 0.10, 0.08, 0.06, 0.04),
+   female= c(0.11, 0.11, 0.10, 0.08, 0.06, 0.04))
> 
> cand  <- candes(phen=Phen, sKin = sKin, cont=cont)
Column 'Sire' was missing. It is set to NA.
Column 'Dam' was missing. It is set to NA.
The population is evaluated at time 2014

 Mean values of the parameters are:   Value 
 for trait   'BV'   in Angler:       -0.1195
 for kinship 'sKin' in Angler:        0.0489

 Available objective functions and constraints:                   
 for trait   'BV'   in Angler: min.BV, max.BV, lb.BV, eq.BV, ub.BV
 for kinship 'sKin' in Angler: min.sKin, ub.sKin                  

 ub  lb uniform

> con   <- list(uniform="female", ub.sKin = 0.047)
> Offspring <- opticont("max.BV", cand, con, trace=FALSE)

Using solver 'cccp2' with parameters: 
         Value
trace        0
abstol   1e-05
feastol  1e-05
stepadj    0.9
maxiters   100
reltol   1e-06
beta       0.5

            valid solver  status
             TRUE  cccp2 optimal

   Variable                  Value      Bound    OK?
   --------------------------------------------------
   BV                 Angler 0.1161 max        :      
   --------------------------------------------------
   lower bounds              all x  >=  lb     : TRUE 
   upper bounds              all x  <=  ub     : TRUE 
   breed contribution Angler 1      ==  1      : TRUE 
   sex contrib. diff. Angler 0      ==  0      : TRUE 
   BV                 Angler 0.1161            :      
   sKin               Angler 0.047  <=  0.047  : TRUE 
   --------------------------------------------------

> 
> 
> #####  Minimize inbreeding   #####
> Candidate   <- Offspring$parent
> Candidate$n <- noffspring(Candidate, N=20)$nOff
> Mating      <- matings(Candidate, sKin)
Error in ECOS_csolve(c = sig * c(Kin), G = G, h = h, dims = dims, A = A,  : 
  G is required to be of class dgCMatrix or matrix or simple_triplet_matrix
Calls: matings -> ECOS_csolve
Execution halted