* using log directory 'd:/Rcompile/CRANpkg/local/3.5/RobustGaSP.Rcheck' * using R version 3.5.3 (2019-03-11) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'RobustGaSP/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'RobustGaSP' version '0.5.7' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'RobustGaSP' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * loading checks for arch 'i386' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * loading checks for arch 'x64' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [7s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking examples ... ** running examples for arch 'i386' ... ERROR 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 ** running examples for arch 'x64' ... ERROR 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 936428.5 156245.4 454855.3 42378.38 The initial values of range parameters are 18728.57 3124.908 9097.106 847.5677 Start of the optimization 1 : The number of interation is 37 The value of the posterior is 63671.61 Optimized range parameters are 66.62619 0.9410182 26.11876 42378.38 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 23 The value of the posterior is 36977.57 Optimized range parameters are 135482.9 2184.202 227007.4 42378.38 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 * checking PDF version of manual ... OK * DONE Status: 2 ERRORs