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

> ### Name: GeoKrig
> ### Title: Spatial (bivariate) and spatio temporal optimal linear
> ###   prediction for Gaussian and non Gaussian random fields.
> ### Aliases: GeoKrig
> ### Keywords: Composite
> 
> ### ** Examples
> 
> 
> library(GeoModels)
> ################################################################
> ########### Examples of spatial kriging ############
> ################################################################
> 
> ################################################################
> ###
> ### Example 1. Spatial  kriging of a
> ### Gaussian random fields with Gen wendland correlation.
> ###
> ################################################################
> 
> model="Gaussian"
> set.seed(79)
> x = runif(300, 0, 1)
> y = runif(300, 0, 1)
> coords=cbind(x,y)
> # Set the exponential cov parameters:
> corrmodel = "GenWend"
> mean=0; sill=5; nugget=0
> scale=0.2;smooth=0;power2=4
> 
> param=list(mean=mean,sill=sill,nugget=nugget,scale=scale,smooth=smooth,power2=power2)
> 
> # Simulation of the spatial Gaussian random field:
> data = GeoSim(coordx=coords, corrmodel=corrmodel,
+               param=param)$data
> 
> ## estimation with pairwise likelihood
> fixed=list(nugget=nugget,smooth=0,power2=power2)
> start=list(mean=0,scale=scale,sill=1)
> I=Inf
> lower=list(mean=-I,scale=0,sill=0)
> upper=list(mean= I,scale=I,sill=I)
> # Maximum pairwise likelihood fitting :
> fit = GeoFit(data, coordx=coords, corrmodel=corrmodel,model=model,
+              likelihood='Marginal', type='Pairwise',neighb=3,
+              optimizer="nlminb", lower=lower,upper=upper,
+              start=start,fixed=fixed)
> 
> # locations to predict
> xx=seq(0,1,0.03)
> loc_to_pred=as.matrix(expand.grid(xx,xx))
> 
> ## first option
> #param=append(fit$param,fit$fixed)
> #pr=GeoKrig(loc=loc_to_pred,coordx=coords,corrmodel=corrmodel,
> #       model=model,param=param,data=data,mse=TRUE)
> 
> ## second option using object GeoFit
> pr=GeoKrig(fit,loc=loc_to_pred,mse=TRUE)
> 
> 
> colour = rainbow(100)
> 
> opar=par(no.readonly = TRUE)
> par(mfrow=c(1,3))
> quilt.plot(coords,data,col=colour)
> # simple kriging map prediction
> image.plot(xx, xx, matrix(pr$pred,ncol=length(xx)),col=colour,
+            xlab="",ylab="",
+            main=" Kriging ")
> 
> # simple kriging MSE map prediction variance
> image.plot(xx, xx, matrix(pr$mse,ncol=length(xx)),col=colour,
+            xlab="",ylab="",main="Std error")
> par(opar)
> 
> ################################################################
> ###
> ### Example 2. Spatial  kriging of a Skew
> ### Gaussian random fields with Matern correlation.
> ###
> ################################################################
> model="SkewGaussian"
> set.seed(79)
> x = runif(300, 0, 1)
> y = runif(300, 0, 1)
> coords=cbind(x,y)
> # Set the exponential cov parameters:
> corrmodel = "Matern"
> mean=0
> sill=2
> nugget=0
> scale=0.1
> smooth=0.5
> skew=3
> param=list(mean=mean,sill=sill,nugget=nugget,scale=scale,smooth=smooth,skew=skew)
> 
> # Simulation of the spatial skew Gaussian random field:
> data = GeoSim(coordx=coords, corrmodel=corrmodel,model=model,
+               param=param)$data
> 
> fixed=list(nugget=nugget,smooth=smooth)
> start=list(mean=0,scale=scale,sill=1,skew=skew)
> I=Inf
> lower=list(mean=-I,scale=0,sill=0,skew=-I)
> upper=list(mean= I,scale=I,sill=I,skew=I)
> # Maximum pairwise likelihood fitting :
> fit = GeoFit2(data, coordx=coords, corrmodel=corrmodel,model=model,
+               likelihood='Marginal', type='Pairwise',neighb=3,
+               optimizer="nlminb", lower=lower,upper=upper,
+               start=start,fixed=fixed)
> 
> # locations to predict
> xx=seq(0,1,0.03)
> loc_to_pred=as.matrix(expand.grid(xx,xx))
> ## optimal linear kriging
> pr=GeoKrig(fit,loc=loc_to_pred,mse=TRUE)
> 
> colour = rainbow(100)
> 
> opar=par(no.readonly = TRUE)
> par(mfrow=c(1,3))
> quilt.plot(coords,data,col=colour)
> # simple kriging map prediction
> image.plot(xx, xx, matrix(pr$pred,ncol=length(xx)),col=colour,
+            xlab="",ylab="",
+            main=" Kriging ")
> 
> # simple kriging MSE map prediction variance
> image.plot(xx, xx, matrix(pr$mse,ncol=length(xx)),col=colour,
+            xlab="",ylab="",main="Std error")
> par(opar)
> 
> ################################################################
> ###
> ### Example 3. Spatial  kriging  of a 
> ###   Gamma random field with mean spatial regression
> ###
> ###############################################################
> set.seed(312)
> model="Gamma"
> corrmodel = "GenWend"  
> # Define the spatial-coordinates of the points:
> NN=300
> coords=cbind(runif(NN),runif(NN))
> ## matrix covariates
> a0=rep(1,NN)
> a1=runif(NN,0,1)
> X=cbind(a0,a1)
> ##Set model parameters
> shape=2
> ## regression parameters
> mean = 1;mean1= -0.2
> # correlation parameters
> nugget = 0;power2=4
> scale = 0.3;smooth=0    
> 
> ## simulation
> param=list(shape=shape,nugget=nugget,mean=mean,mean1=mean1, 
+            scale=scale,power2=power2,smooth=smooth)
> data = GeoSim(coordx=coords,corrmodel=corrmodel, param=param,
+               model=model,X=X)$data
> 
> #####starting and fixed parameters
> fixed=list(nugget=nugget,power2=power2,smooth=smooth)
> start=list(mean=mean,mean1=mean1, scale=scale,shape=shape)
> 
> ## estimation with pairwise likelihood
> fit2 = GeoFit(data=data,coordx=coords,corrmodel=corrmodel,X=X,
+               neighb=3,likelihood="Conditional",type="Pairwise",
+               start=start,fixed=fixed, model = model)
> 
> # locations to predict with associated covariates
> xx=seq(0,1,0.03)
> loc_to_pred=as.matrix(expand.grid(xx,xx))
> NP=nrow(loc_to_pred)
> a0=rep(1,NP)
> a1=runif(NP,0,1)
> Xloc=cbind(a0,a1)
> 
> #optimal linear  kriging 
> pr=GeoKrig(fit2,loc=loc_to_pred,Xloc=Xloc,sparse=TRUE,mse=TRUE)
> 
> ## map 
> opar=par(no.readonly = TRUE)
> par(mfrow=c(1,3))
> quilt.plot(coords,data,main="Data")
> map=matrix(pr$pred,ncol=length(xx))
> mapmse=matrix(pr$mse,ncol=length(xx))
> image.plot(xx, xx, map,
+            xlab="",ylab="",main="Kriging ")
> 
> image.plot(xx, xx, mapmse,
+            xlab="",ylab="",main="MSE")
> par(opar)
> 
> 
> ################################################################
> ########### Examples of spatio temporal kriging ############
> ################################################################
> 
> ################################################################
> ###
> ### Example 4. Spatio temporal simple kriging of n locations
> ### sites and m temporal instants for a Gaussian random fields
> ### with estimated double Wendland correlation.
> ###
> ###############################################################
> model="Gaussian"
> # Define the spatial-coordinates of the points:
> x = runif(300, 0, 1)
> y = runif(300, 0, 1)
> coords=cbind(x,y)
> times=1:4
> 
> # Define model correlation modek and associated parameters
> corrmodel="Wend0_Wend0"
> param=list(nugget=0,mean=0,power2_s=4,power2_t=4,
+            scale_s=0.2,scale_t=2,sill=1)
> 
> # Simulation of the space time Gaussian random field:
> set.seed(31)
> data=GeoSim(coordx=coords,coordt=times,corrmodel=corrmodel,sparse=TRUE,
+             param=param)$data

 *** caught segfault ***
address 0x1, cause 'memory not mapped'

Traceback:
 1: StartParam(coords[, 1], coords[, 2], coordz, coordt, coordx_dyn,     corrmodel, NULL, distance, "Simulation", NULL, grid, NULL,     maxdist, NULL, maxtime, model, n, param, NULL, NULL, radius,     NULL, taper, tapsep, type, type, FALSE, copula, X, FALSE,     FALSE)
 2: GeoCovmatrix(coordx = coordx, coordy = coordy, coordz = coordz,     coordt = coordt, coordx_dyn = coordx_dyn, corrmodel = corrmodel,     distance = distance, grid = grid, model = "Gaussian", n = n,     param = append(mc, pc), anisopars = anisopars, radius = radius,     sparse = sparse, copula = NULL, X = X)
 3: GeoSim(coordx = coords, coordt = times, corrmodel = corrmodel,     sparse = TRUE, param = param)
An irrecoverable exception occurred. R is aborting now ...