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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: cf_highdim
> ### Title: Plot 2D contour slices of higher dimensional functions
> ### Aliases: cf_highdim
> 
> ### ** Examples
> 
> ## Not run: 
> ##D # Only use 4 dims of 8 for borehole function
> ##D cf_highdim(function(x) TestFunctions::borehole(c(x,.5,.5,.5,.5)), 4)
> ##D # Add points
> ##D cf_highdim(function(x) TestFunctions::borehole(c(x,.5,.5,.5,.5)), 4,
> ##D            pts=matrix(c(.1,.3,.6,.9),1,4))
> ##D 
> ##D # Full 8D borehole function
> ##D cf_highdim(TestFunctions::borehole, 8)
> ##D 
> ##D # Putting each plot on separate scale
> ##D cf_highdim(TestFunctions::borehole, 8, n=10, same_scale = FALSE)
> ## End(Not run)
> 
> cf_highdim(function(x) {x[1]^2 + exp(x[2])}, D=3)
> 
> friedman <- function(x) {
+   10*sin(pi*x[1]*x[2]) + 20*(x[3]-.5)^2 + 10*x[4] + 5*x[5]
+ }
> cf_highdim(friedman, 5, color.palette=topo.colors)
> cf_highdim(friedman, 5, 
+            color.palette=function(x) {gray((1:x)/x)},
+            nlevels=10)
>            
> ## Not run: 
> ##D # Recreate Plate 1 or Figure 1.1 from Engineering Design via Surrogate
> ##D # Modelling by Forrester, Sobester, and Keane (2008).
> ##D cf_highdim(function(x)TestFunctions::wingweight(x, scale_it=FALSE),
> ##D   D=10, low = c(150,220,6,-10,16,.5,.08,2.5,1700,.025),
> ##D   high = c(200,300,10,10,45,1,.18,6,2500,.08),
> ##D   baseline=c(174,252,7.52,0,34,.672,.12,3.8,2000,.064),
> ##D   color.palette=topo.colors, 
> ##D   var_names=c('SW', 'Wtw', 'A', 'Lambda', 'q', 'lambda', 'tc', 'Nz', 'Wdg'))
> ## End(Not run)
> 
> # Average over background dimensions, use higher reps to reduce noise.
> f1 <- function(x) {x[1] + x[2]^2 + x[3]^3}
> cf_highdim(f1, 4, average=TRUE, average_reps=1e2, n=10)
> f1b <- function(x) {x[,1] + x[,2]^2 + x[,3]^3}
> cf_highdim(f1b, 4, average=TRUE, average_reps=1e2, n=10, batchmax=Inf)
malloc(): unsorted double linked list corrupted
Aborted