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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: mixopt
> ### Title: Mixed variable optimization using coordinate descent
> ### Aliases: mixopt mixopt_blockcd mixopt_coorddesc mixopt_multistart
> 
> ### ** Examples
> 
> # Simple 1D example
> mixopt_blockcd(par=list(mopar_cts(2,8)), fn=function(x) {(4.5-x[1])^2})
$par
[1] 4.5

$val
[1] 0

$counts
function gradient 
      13        0 

$runtime
Time difference of 0.005939245 secs

> # With gradient (isn't faster)
> mixopt_blockcd(par=list(mopar_cts(2,8)), fn=function(x) {(4.5-x[1])^2},
+                gr=function(x) {-2*(4.5-x[1])})
$par
[1] 4.5

$val
[1] 0

$counts
function gradient 
       5        4 

$runtime
Time difference of 0.02119637 secs

> 
> # 1D discrete ordered
> mixopt_blockcd(par=list(mopar_ordered(100:10000)),
+                  fn=function(x) {(x[1] - 500.3)^2})
$par
[1] 500

$val
[1] 0.09

$counts
function gradient 
      42        0 

$runtime
Time difference of 0.004769802 secs

> 
> # 2D: one continuous, one factor
> mixopt_blockcd(par=list(mopar_cts(2,8), mopar_unordered(letters[1:6])),
+                  fn=function(x) {ifelse(x[2] == 'b', -1, 0) +
+                                  (4.5-x[1])^2})
$par
mixopt_list: [1] 4.5 b

$val
[1] -1

$counts
function gradient 
      26        0 

$runtime
Time difference of 0.0240624 secs

> # Simple 1D example
> mixopt_coorddesc(par=list(mopar_cts(2,8)), fn=function(x) {(4.5-x[1])^2})
$par
[1] 4.5

$val
[1] 0

$counts
function gradient 
      13        0 

$runtime
Time difference of 0.0005176067 secs

> 
> # 1D discrete ordered
> mixopt_coorddesc(par=list(mopar_ordered(100:10000)),
+                  fn=function(x) {(x[1] - 500.3)^2})
$par
[1] 500

$val
[1] 0.09

$counts
function gradient 
      42        0 

$runtime
Time difference of 0.0009760857 secs

> 
> # 2D: one continuous, one factor
> mixopt_coorddesc(par=list(mopar_cts(2,8), mopar_unordered(letters[1:6])),
+                  fn=function(x) {ifelse(x[2] == 'b', -1, 0) +
+                                  (4.5-x[1])^2})
$par
mixopt_list: [1] 4.5 b

$val
[1] -1

$counts
function gradient 
      26        0 

$runtime
Time difference of 0.00177002 secs

> # 2D
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
Execution halted