Running 'anisotropyTest.R' [12s]
  Running 'block.R' [6s]
  Running 'idw.R' [5s]
  Running 'interpolate.R' [12s]
  Running 'interpolateBlock.R' [6s]
  Running 'javaR.R' [4s]
  Running 'linearVariogram.R' [4s]
  Running 'minimal.R' [5s]
  Running 'transGaussian.R' [6s]
  Running 'unbiased.R' [7s]
Running the tests in 'tests/anisotropyTest.R' failed.
Complete output:
  > library(intamap)
  Loading required package: sp
  > library(automap)
  > library(gstat)
  > set.seed(13531)
  > 
  > plotFigs = FALSE
  > npts = 1000
  > pts=SpatialPoints(cbind(runif(npts),runif(npts)))
  > d = SpatialPointsDataFrame(cbind(0,0),data.frame(z=1))
  > observations = krige(z~1,d,pts,vgm(1, "Sph", .5,anis=c(90,0.5)),nsim=1,nmax=50,beta=0)
  [using conditional Gaussian simulation]
  > 
  > #spplot(sim)
  > 
  > predictionLocations = spsample(observations, 1000, "regular")
  > 
  > # We dont know the projection of the data at this stage, assume it is
  > # somehow metric
  > 
  > 
  > 
  > formulaString = as.formula(sim1~1)
  > krigingObject = createIntamapObject(
  + 	observations = observations,
  + 	predictionLocations = predictionLocations,
  +   formulaString = formulaString
  + )
  > class(krigingObject) = c("automap")
  > 
  > checkSetup(krigingObject)
  Checking object ... OK
  > object = preProcess(krigingObject)
  > objTemp = estimateAnisotropy(object)
  > #rotate Data
  > objTemp$observations = rotateAnisotropicData(objTemp$observations, objTemp$anisPar)
  > #Estimate Variogram Model
  > vario = autofitVariogram(objTemp$formulaString, objTemp$observations, model = "Sph")$var_model
  > objTemp$anisPar
  $ratio
  [1] 1.473469
  
  $direction
  [1] 10.79148
  
  $Q
           Q11      Q22       Q12
  [1,] 52.7867 108.0044 -10.92161
  
  $doRotation
  [1] TRUE
  
  > if (plotFigs) {
  +   spplot(object$observations, "sim1", col.regions=bpy.colors())
  +   spplot(objTemp$observations, "sim1", col.regions=bpy.colors())
  +   plot(variogram(sim1~1, object$observations, alpha=c(0, 90)), vario)
  + }
  > print(vario, digits = 3)
    model   psill range
  1   Nug 0.00423 0.000
  2   Sph 0.76877 0.341
  > 
  > 
  > vmod = vgm(1, "Sph", 1, anis = c(90, 0.5))
  > krigingObject$observations = krige(z~1, d, pts, vmod, nsim = 1, nmax = 50, beta = 0)
  [using conditional Gaussian simulation]
  > object = preProcess(krigingObject)
  > objTemp = estimateAnisotropy(object)
  > objTemp$anisPar
  $ratio
  [1] 1.463776
  
  $direction
  [1] 0.4183025
  
  $Q
            Q11      Q22       Q12
  [1,] 30.88621 66.17211 -0.257632
  
  $doRotation
  [1] TRUE
  
  > objTemp$observations = rotateAnisotropicData(objTemp$observations, objTemp$anisPar)
  > vario = autofitVariogram(objTemp$formulaString, objTemp$observations, model="Sph")$var_model
  > print(vario, digits = 3)
    model psill range
  1   Nug 0.000 0.000
  2   Sph 0.943 0.671
  > vmod
    model psill range ang1 anis1
  1   Sph     1     1   90   0.5
  > 
  > vmod = vgm(1, "Sph", 2, anis=c(45, 0.2))
  > krigingObject$observations = krige(z~1, d, pts, vmod, nsim = 1, nmax = 50, beta = 0)
  [using conditional Gaussian simulation]
  > object = preProcess(krigingObject)
  > objTemp = estimateAnisotropy(object)
  > objTemp$anisPar
  $ratio
  [1] 2.932813
  
  $direction
  [1] 42.98085
  
  $Q
            Q11      Q22       Q12
  [1,] 54.28156 60.69178 -45.39902
  
  $doRotation
  [1] TRUE
  
  > objTemp$observations = rotateAnisotropicData(objTemp$observations, objTemp$anisPar)
  > vario = autofitVariogram(objTemp$formulaString, objTemp$observations, model = "Sph")$var_model
  > print(vario, digits = 3)
    model   psill range
  1   Nug 0.00102  0.00
  2   Sph 0.89779  1.24
  > vmod
    model psill range ang1 anis1
  1   Sph     1     2   45   0.2
  > 
  > 
  > vmod = vgm(1,"Sph",1,anis=c(135,0.5))
  > krigingObject$observations = krige(z~1,d,pts,vmod,nsim=1,nmax=50,beta=0)
  [using conditional Gaussian simulation]
  > object = preProcess(krigingObject)
  > objTemp=estimateAnisotropy(object)
  Warning message:
  In estimateAnisotropy(object) :
    Slope tensors estimation error. Override anistropy estimation.
  > objTemp$anisPar
  $R
  [1] 1
  
  $theta.deg
  [1] 0
  
  $Q
       [,1] [,2] [,3]
  [1,]    0    0    0
  
  $doRotation
  [1] FALSE
  
  > objTemp$observations=intamap:::rotateAnisotropicData(objTemp$observations,objTemp$anisPar)
  Error in .local(obj, ...) : 
    cannot derive coordinates from non-numeric matrix
  Calls: <Anonymous> ... coordinates -> .local -> coordinates -> coordinates -> .local
  Execution halted