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

> ### Name: predict.ppgasp
> ### Title: Prediction for PP GaSP model
> ### Aliases: predict.ppgasp predict.ppgasp-class predict,ppgasp-method
> 
> ### ** Examples
> 
>   library(RobustGaSP)
>   #----------------------------------
>   # an example of environmental model
>   #----------------------------------
>   
>   set.seed(1)
>   n=100
>   p=4
>   ##using the latin hypercube will be better
>   #library(lhs)
>   #input_samples=maximinLHS(n,p)
>   input_samples=matrix(runif(n*p),n,p)
>   input=matrix(0,n,p)
>   input[,1]=7+input_samples[,1]*6
>   input[,2]=0.02+input_samples[,2]*1
>   input[,3]=0.01+input_samples[,3]*2.99
>   input[,4]=30.01+input_samples[,4]*0.285
>   
>   k=400
>   output=matrix(0,n,k)
>   ##environ.4.data is an environmental model on a spatial-time vector
>   ##? environ.4.data
>   for(i in 1:n){
+     output[i,]=environ.4.data(input[i,],s=seq(0.15,3,0.15),t=seq(3,60,3)  )
+   }
>   
>   ##samples some test inputs
>   n_star=1000
>   sample_unif=matrix(runif(n_star*p),n_star,p)
>   
>   testing_input=matrix(0,n_star,p)
>   testing_input[,1]=7+sample_unif[,1]*6
>   testing_input[,2]=0.02+sample_unif[,2]*1
>   testing_input[,3]=0.01+sample_unif[,3]*2.99
>   testing_input[,4]=30.01+sample_unif[,4]*0.285
>   
>   
>   testing_output=matrix(0,n_star,k)
>   
>   for(i in 1:n_star){
+     testing_output[i,]=environ.4.data(testing_input[i,],s=seq(0.15,3,0.15
+     ),t=seq(3,60,3) )
+   }
>   
>   ##we do a transformation of the output 
>   ##one can change the number of initial values to test
>   log_output_1=log(output+1)
>   m.ppgasp=ppgasp(design=input,response=log_output_1,kernel_type
+                   ='pow_exp',num_initial_values=2)
The upper bounds of the range parameters are 931717.5 155459.4 452567 42165.19 
The initial values of range parameters are 18634.35 3109.187 9051.341 843.3038 
Start of the optimization  1  : 
The number of interation is  33 
 The value of the posterior is  63671.61 
 Optimized range parameters are 66.62619 0.9410182 26.11876 42165.19 
 Optimized nugget parameter is 0 
 Convergence:  TRUE 
The initial values of range parameters are 1.050253 0.1752373 0.5101439 0.04752957 
Start of the optimization  2  : 
The number of interation is  25 
 The value of the posterior is  36977.63 
 Optimized range parameters are 134901.2 2173.659 225877.9 42165.19 
 Optimized nugget parameter is 0 
 Convergence:  TRUE 
>   m_pred.ppgasp=predict(m.ppgasp,testing_input)
>   ##we transform back for the prediction
>   m_pred_ppgasp_mean=exp(m_pred.ppgasp$mean)-1
>   ##mean squared error
>   mean( (m_pred_ppgasp_mean-testing_output)^2)
[1] 0.6738959
>   ##variance of the testing outputs
>   var(as.numeric(testing_output))
[1] 11.48627
>   
>   ##makes plots for the testing 
>   par(mfrow=c(1,2))
>   t=seq(3,60,3)
>   s=seq(0.15,3,0.15)
>   testing_plot_1=matrix(testing_output[1,],  length(t), length(s) )
>   
>   max_testing_plot_1=max(testing_plot_1)
>   min_testing_plot_1=min(testing_plot_1)
>   
>   image(x=t,y=s,testing_plot_1,  col = hcl.colors(100, "terrain"),main='test outputs')
Error in hcl.colors(100, "terrain") : 
  could not find function "hcl.colors"
Calls: image -> image.default
Execution halted