- using R Under development (unstable) (2025-02-15 r87723)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
- running under: Fedora Linux 40 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘geostatsp/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘geostatsp’ version ‘2.0.8’
- checking package namespace information ... OK
- checking package dependencies ... INFO
Package suggested but not available for checking: ‘RandomFields’
- checking if this is a source package ... WARNING
Subdirectory ‘geostatsp/src’ contains apparent object files/libraries
Matrix_stubs_here.o gmrfEdge.o gmrfLik.o matern.o maternLogL.o
maternLogLopt.o optimize.o register.o
Object files/libraries should not be included in a source package.
Subdirectory ‘src’ contains:
symbols.rds
These are unlikely file names for src files.
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘geostatsp’ can be installed ... [62s/88s] OK
See the install log for details.
- used C compiler: ‘gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)’
- checking package directory ... OK
- checking ‘build’ 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 code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [14s/18s] OK
- checking whether the package can be loaded with stated dependencies ... [13s/17s] OK
- checking whether the package can be unloaded cleanly ... [14s/18s] OK
- checking whether the namespace can be loaded with stated dependencies ... [14s/17s] OK
- checking whether the namespace can be unloaded cleanly ... [14s/19s] OK
- checking loading without being on the library search path ... [14s/18s] 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 ... [93s/126s] OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd line widths ... 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 ... [14s/19s] OK
- checking data for ASCII and uncompressed saves ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking compilation flags in Makevars ... OK
- checking for GNU extensions in Makefiles ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking use of PKG_*FLAGS in Makefiles ... OK
- checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
- checking include directives in Makefiles ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compilation flags used ... OK
- checking compiled code ... OK
- checking sizes of PDF files under ‘inst/doc’ ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [31m/22m] ERROR
Running examples in ‘geostatsp-Ex.R’ failed
The error most likely occurred in:
> ### Name: RFsimulate
> ### Title: Simulation of Random Fields
> ### Aliases: RFsimulate modelRandomFields RFsimulate RFsimulate-methods
> ### RFsimulate,ANY,SpatRaster-method RFsimulate,numeric,SpatRaster-method
> ### RFsimulate,numeric,SpatVector-method
> ### RFsimulate,RMmodel,SpatVector-method
> ### RFsimulate,RMmodel,SpatRaster-method
> ### RFsimulate,matrix,SpatRaster-method
> ### RFsimulate,matrix,SpatVector-method RFsimulate,data.frame,ANY-method
> ### Keywords: spatial
>
> ### ** Examples
>
> library('geostatsp')
>
> # exclude this line to use the RandomFields package
> options(useRandomFields = FALSE)
>
> model1 <- c(var=5, range=1,shape=0.5)
>
>
> myraster = rast(nrows=20,ncols=30,extent = ext(0,6,0,4),
+ crs="+proj=utm +zone=17 +datum=NAD27 +units=m +no_defs")
>
> set.seed(0)
>
> simu <- RFsimulate(model1, x=myraster, n=3)
install the RandomFields package for faster simulations
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [0m/90m] ERROR
Running ‘RFsimulate.R’ [31m/22m]
Running ‘krige.R’ [25s/33s]
Running ‘lgcp.R’ [88s/91s]
Running ‘lgm.R’ [71s/83s]
Running ‘lgmRaster.R’ [31m/21m]
Running ‘likfitLgm.R’ [28s/33s]
Running ‘matern.R’ [15s/18s]
Running ‘maternGmrfPrec.R’ [31m/21m]
Running ‘profLlgm.R’ [0m/22m]
Running ‘simLgcp.R’
Running the tests in ‘tests/RFsimulate.R’ failed.
Complete output:
> library("geostatsp")
Loading required package: Matrix
Loading required package: terra
terra 1.8.21
>
> model <- c(var=5, range=20,shape=0.5)
>
> # any old crs
> theCrs = "+proj=utm +zone=17 +datum=NAD27 +units=m +no_defs"
>
> # don't test using the randomFields package, it's currently broken on some R builds
> options(useRandomFields = FALSE)
>
> myraster = rast(nrows=20,ncols=20,extent = ext(100,110,100,110),
+ crs=theCrs)
>
> set.seed(0)
> simu = RFsimulate(model = rbind(a=model, b=model+0.1),
+ x=myraster, n=4
+ )
Running the tests in ‘tests/lgmRaster.R’ failed.
Complete output:
> #+ setup
> library('geostatsp')
Loading required package: Matrix
Loading required package: terra
terra 1.8.21
> #'
>
> #' # simulated data
>
> # exclude this line to use the RandomFields package
> options(useRandomFields = FALSE)
>
> Ncell = 40
>
> myRaster = squareRaster(ext(0,6000,0,6000), Ncell)
>
> myParam=c(oneminusar=0.1, conditionalVariance=2.5^2,shape=2)
> myQ = maternGmrfPrec(myRaster, param=myParam)
> attributes(myQ)$info$optimalShape
shape variance range cellSize
4.092496 110.524266 900.000000 150.000000
> set.seed(0)
> mySim = RFsimulate(attributes(myQ)$info$optimalShape, myRaster)
install the RandomFields package for faster simulations
Running the tests in ‘tests/maternGmrfPrec.R’ failed.
Complete output:
> library('geostatsp')
Loading required package: Matrix
Loading required package: terra
terra 1.8.21
> matrix(NNmat(7, 7)[,25], 7, 7)
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 0 0 0 6 0 0 0
[2,] 0 0 5 4 5 0 0
[3,] 0 5 3 2 3 5 0
[4,] 6 4 2 1 2 4 6
[5,] 0 5 3 2 3 5 0
[6,] 0 0 5 4 5 0 0
[7,] 0 0 0 6 0 0 0
>
> myr = squareRaster(ext(0,600,0,300), 60)
> theNN = NNmat(myr)
>
>
> params=c(range = 6*xres(myr),
+ cellSize=xres(myr),
+ shape=2,
+ variance=1600)
>
>
> # precision matrix without adjusting for edge effects
> system.time({precMat = maternGmrfPrec(N=theNN, param=params,
+ adjustEdges=FALSE)})
user system elapsed
0.484 0.012 0.608
>
>
> system.time({theNNadj = NNmat(N=myr, nearest=params['shape']+1, adjustEdges=TRUE)})
user system elapsed
0.225 0.021 0.324
> # and with the adjustment
> system.time({precMatCorr =maternGmrfPrec(N=theNNadj, param=params,
+ adjustEdges=TRUE)})
Running the tests in ‘tests/profLlgm.R’ failed.
Complete output:
>
> library('geostatsp')
Loading required package: Matrix
Loading required package: terra
terra 1.8.21
> data('swissRain')
> swissRain = unwrap(swissRain)
> swissAltitude = unwrap(swissAltitude)
>
> Ncores = c(1,2)[1+(.Platform$OS.type=='unix')]
>
>
>
> sr2 = swissRain
> sr2$elev = extract(swissAltitude, sr2)
Warning message:
[`[[<-`] only using the first column
> swissFit = likfitLgm(
+ data=sr2,
+ formula=rain~ elev,
+ param=c(range=10000,shape=1,nugget=0,boxcox=0.5,anisoRatio=2,anisoAngleDegrees=45),
+ paramToEstimate = c("range",'anisoAngleDegrees','anisoRatio'),
+ reml=FALSE,
+ verbose=FALSE
+ )
>
>
> # calculate log-likelihood at the MLE's, but re-estimate variance
> sl = loglikLgm(
+ swissFit$param[c('range','shape','boxcox', 'anisoRatio', 'anisoAngleRadians')],
+ data=sr2,
+ formula=rain~ elev,
+ reml=swissFit$model$reml)
>
>
> # calculate log-likelihood without re-estimating variance
> sigSqHat = attributes(sl)$totalVarHat
> sl1 = loglikLgm(
+ c(attributes(sl)$param[
+ c('boxcox','anisoRatio','anisoAngleRadians','shape', 'range')],
+ variance=sigSqHat),
+ data=sr2,
+ formula=rain~ elev,
+ reml=swissFit$model$reml)
>
>
> # re=estimate the anisotropy parameters but not the range
> sf2 = likfitLgm(
+ data=swissFit$data,
+ formula=swissFit$model$formula,
+ param= swissFit$param[c('range','nugget','shape','boxcox', 'anisoRatio', 'anisoAngleRadians')],
+ paramToEstimate = c('variance','anisoAngleRadians','anisoRatio'),
+ reml=swissFit$model$reml)
>
> # these should all be the same
> as.numeric(sl1)
[1] 644.4812
> as.numeric(sl)
[1] 644.4812
> swissFit$optim$logL
m2logL.ml logL.ml
644.4812 -322.2406
> sf2$optim$logL
m2logL.ml logL.ml
644.4812 -322.2406
>
> date()
[1] "Sat Feb 15 16:36:24 2025"
> x=profLlgm(swissFit, mc.cores=Ncores,
+ range=seq(15000, 55000 , len=12)
+ )
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [506s/479s] OK
- checking PDF version of manual ... [10s/14s] OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 2 ERRORs, 1 WARNING