Running ‘rtop.R’ [10s/12s]
  Running ‘rtop_sf.R’ [45s/54s]
  Comparing ‘rtop_sf.Rout’ to ‘rtop_sf.Rout.save’ ... OK
Running the tests in ‘tests/rtop.R’ failed.
Complete output:
  > set.seed(1501)
  > #-----------------------------
  > ## IGNORE_RDIFF_BEGIN
  > library(rtop)
  > if (interactive()) options(error = recover)
  >   # Read directly from shape-files in data directory
  >   rpath = system.file("extdata",package="rtop")
  >   library(sf)
  Linking to GEOS 3.13.1, GDAL 3.10.3, PROJ 9.6.0; sf_use_s2() is TRUE
  >   observations = st_read(rpath, "observations")
  Reading layer `observations' from data source 
    `/home/hornik/tmp/R.check/r-release-gcc/Work/build/Packages/rtop/extdata' 
    using driver `ESRI Shapefile'
  Simple feature collection with 57 features and 7 fields
  Geometry type: POLYGON
  Dimension:     XY
  Bounding box:  xmin: 392041.1 ymin: 454983.1 xmax: 512819.5 ymax: 543984.4
  Projected CRS: Lambert_Conformal_Conic
  >   predictionLocations = st_read(rpath, "predictionLocations")
  Reading layer `predictionLocations' from data source 
    `/home/hornik/tmp/R.check/r-release-gcc/Work/build/Packages/rtop/extdata' 
    using driver `ESRI Shapefile'
  Simple feature collection with 235 features and 5 fields
  Geometry type: POLYGON
  Dimension:     XY
  Bounding box:  xmin: 393416.8 ymin: 454919.1 xmax: 519903.3 ymax: 543984.4
  Projected CRS: Lambert_Conformal_Conic
  > ## IGNORE_RDIFF_END
  >   
  >   
  >   observations = as(observations, "Spatial")
  >   predictionLocations = as(predictionLocations, "Spatial")
  > #Finding a few prediction locations of them
  >   
  >   observations = observations[1:30,]
  >   predictionLocations = predictionLocations[1:2,]
  >   
  >   observations$obs = observations$QSUMMER_OB/observations$AREASQKM
  >   
  >   # Setting some parameters 
  >   params = list(gDist = TRUE, cloud = FALSE, rresol = 25, hresol = 3, debug.level = -1)
  >   # Build an object
  >   rtopObj = createRtopObject(observations,predictionLocations, params = params, formulaString = "obs ~ 1" )
  >   # Fit a variogram (function also creates it)
  >   rtopObj = rtopFitVariogram(rtopObj, iprint = -1)
  >   print(rtopObj$variogramModel, 3)
  $model
  [1] "Ex1"
  
  $params
  [1] 2.51e-04 4.26e+05 0.00e+00 1.01e-05 9.23e-01
  
  attr(,"class")
  [1] "rtopVariogramModel"
  attr(,"SSErr")
  [1] 0.557
  attr(,"criterion")
  [1] 0.0981
  >   #rtopObj = checkVario(rtopObj)
  >   rtopObj2 = rtopKrige(rtopObj, cv = TRUE)
  [1] "Sampling points from  30 areas"
  > 
  > 
  >   print(attr(rtopObj2$varMatObs,"variogramModel"), 3)
  $model
  [1] "Ex1"
  
  $params
  [1] 2.51e-04 4.26e+05 0.00e+00 1.01e-05 9.23e-01
  
  attr(,"class")
  [1] "rtopVariogramModel"
  attr(,"SSErr")
  [1] 0.557
  attr(,"criterion")
  [1] 0.0981
  >   
  >   rtopObj3 = rtopKrige(rtopObj)
  [1] "Sampling points from  30 areas"
  [1] "Sampling points from  2 areas"
  [1] "Creating prediction semivariance matrix. This can take some time."
  > 
  > 
  >  varmat = varMat(observations, predictionLocations, variogramModel = rtopObj$variogramModel, 
  +                  gDistEst = TRUE, gDistPred = TRUE, rresol = 25, hresol = 3)
  [1] "Sampling points from  30 areas"
  [1] "Sampled on average 54.2 points from 30 areas"
  [1] "Sampling points from  2 areas"
  [1] "Sampled on average 77 points from 2 areas"
  > 
  > all.equal(varmat$varMatObs, rtopObj2$varMatObs)
  [1] TRUE
  > rtopObj4 = rtopKrige(rtopObj2)
  [1] "Sampling points from  2 areas"
  [1] "Creating prediction semivariance matrix. This can take some time."
  > 
  > #debug(rtop:::rtopDisc.SpatialPolygons)
  > #  rtopObj5 = rtopKrige(rtopObj, params = list(cnAreas = 5, cDlim = 10, nclus = 2))
  >   
  >   print(summary(rtopObj2$predictions))
                    Length                    Class                     Mode 
                        30 SpatialPolygonsDataFrame                       S4 
  >   print(summary(rtopObj3$predictions))
                    Length                    Class                     Mode 
                         2 SpatialPolygonsDataFrame                       S4 
  >   print(summary(rtopObj4$predictions))
                    Length                    Class                     Mode 
                         2 SpatialPolygonsDataFrame                       S4 
  >   print(all.equal(rtopObj4$predictions, rtopObj3$predictions))
  [1] TRUE
  >   #spplot(rtopObj$predictions,col.regions = bpy.colors(), c("var1.pred","var1.var"))
  >   
  >   # Cross-validation
  >   #spplot(rtopObj2$predictions,col.regions = bpy.colors(), c("observed","var1.pred"))
  >   print(cor(rtopObj2$predictions$observed,rtopObj2$predictions$var1.pred))
  [1] 0.1678744
  >   
  > 
  > 
  > 
  >   set.seed(1501)
  >   library(intamap)
  Error in library(intamap) : there is no package called 'intamap'
  Execution halted