R Under development (unstable) (2024-11-18 r87347 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #' > #' Header for all (concatenated) test files > #' > #' Require spatstat.model > #' Obtain environment variable controlling tests. > #' > #' $Revision: 1.5 $ $Date: 2020/04/30 05:31:37 $ > > require(spatstat.model) Loading required package: spatstat.model Loading required package: spatstat.data Loading required package: spatstat.univar spatstat.univar 3.1-1 Loading required package: spatstat.geom spatstat.geom 3.3-4 Loading required package: spatstat.random spatstat.random 3.3-2 Loading required package: spatstat.explore Loading required package: nlme spatstat.explore 3.3-3 Loading required package: rpart spatstat.model 3.3-3 > FULLTEST <- (nchar(Sys.getenv("SPATSTAT_TEST", unset="")) > 0) > ALWAYS <- TRUE > cat(paste("--------- Executing", + if(FULLTEST) "** ALL **" else "**RESTRICTED** subset of", + "test code -----------\n")) --------- Executing **RESTRICTED** subset of test code ----------- > # > # tests/NAinCov.R > # > # Testing the response to the presence of NA's in covariates > # > # $Revision: 1.10 $ $Date: 2024/09/30 23:13:54 $ > > if(FULLTEST) { + local({ + X <- runifpoint(42) + Y <- as.im(function(x,y) { x+y }, owin()) + Y[owin(c(0.2,0.4),c(0.2,0.4))] <- NA + ## ..... ppm ...................................... + ## fit model: should produce a warning but no failure + misfit <- ppm(X ~ Y) + ## prediction + Z <- predict(misfit, type="trend", se=TRUE) + ## canonical covariates + M <- model.images(misfit) + ## covariance matrix: all should be silent + v <- vcov(misfit) + ss <- vcov(misfit, what="internals") + ## ..... kppm ...................................... + ## should produce warnings but no failures + misfit <- kppm(X ~Y) + V <- predict(misfit, type="trend", se=TRUE) + M <- model.images(misfit) + refit <- improve.kppm(misfit, dimyx=20) + }) + } > > proc.time() user system elapsed 1.71 0.31 2.03