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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: CrossValidationMuFicokm
> ### Title: Cross Validation Procedure for Multi-Fidelity Cokriging models
> ###   when the observations are removed from the code with the highest
> ###   level of fidelity
> ### Aliases: CrossValidationMuFicokm
> 
> ### ** Examples
> 
> #--- test functions (see [Le GRATIET, L. 2012])
> 	Funcf <- function(x){return(0.5*(6*x-2)^2*sin(12*x-4)+sin(10*cos(5*x)))}
> 	Funcc <- function(x){return((6*x-2)^2*sin(12*x-4)+10*(x-0.5)-5)}
> #--- Data
> 	Dc <- seq(0,1,0.1)
> 	indDf <- c(1,3,7,11)
> 	DNest <- NestedDesign(Dc, nlevel=2 , indices = list(indDf) )
> 	zc <- Funcc(DNest$PX)
> 	zf <- Funcf(ExtractNestDesign(DNest,2))
> 
> #--- Model creation
> 		mymodel <- MuFicokm(
+ 				formula = list(~1,~1+X1), 
+ 				MuFidesign = DNest, 
+ 				response = list(zc,zf), 
+ 				nlevel = 2,
+ 				covtype = "matern5_2")

optimisation start
------------------
* estimation method   : MLE 
* optimisation method : BFGS 
* analytical gradient : used
* trend model : ~1
* covariance model : 
  - type :  matern5_2 
  - nugget : NO
  - parameters lower bounds :  1e-10 
  - parameters upper bounds :  2 
  - best initial criterion value(s) :  -30.1968 

N = 1, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate     0  f=       30.197  |proj g|=      0.35311
At iterate     1  f =       30.121  |proj g|=       0.33826
At iterate     2  f =       30.045  |proj g|=         1.711
At iterate     3  f =       30.034  |proj g|=       0.30372
At iterate     4  f =       30.033  |proj g|=      0.018232
At iterate     5  f =       30.033  |proj g|=    0.00019559
At iterate     6  f =       30.033  |proj g|=     1.146e-07

iterations 6
function evaluations 8
segments explored during Cauchy searches 6
BFGS updates skipped 0
active bounds at final generalized Cauchy point 0
norm of the final projected gradient 1.14602e-07
final function value 30.0335

F = 30.0335
final  value 30.033468 
converged
Error in sweep(x = AR.F, MARGIN = 1, STATS = Z, FUN = "*") : 
  argument "X" is missing, with no default
Calls: MuFicokm -> kmCok -> sweep
Execution halted