R Under development (unstable) (2023-05-08 r84402 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) 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.geom > #' Obtain environment variable controlling tests. > #' > #' $Revision: 1.5 $ $Date: 2020/04/30 05:31:37 $ > > require(spatstat.geom) Loading required package: spatstat.geom Loading required package: spatstat.data spatstat.geom 3.2-1 > 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/quadschemes.R > #' > #' Quadrature schemes, dummy points etc > #' > #' $Revision: 1.8 $ $Date: 2020/12/04 04:56:26 $ > #' > > if(FULLTEST) { + local({ + ## class 'quad' + qu <- quadscheme(cells) + qm <- quadscheme(amacrine) + plot(qu) + plot(qm) + is.multitype(qu) + is.multitype(qm) + a <- param.quad(qu) + a <- param.quad(qm) + a <- equals.quad(qu) + a <- equals.quad(qm) + a <- domain(qu) + unitname(qu) <- c("Furlong", "Furlongs") + + ## utilities + b <- cellmiddles(square(1), 3, 4) + b <- cellmiddles(letterR, 3, 4, distances=FALSE) + b <- cellmiddles(letterR, 3, 4, distances=TRUE) + v <- tilecentroids(square(1), 3, 4) + v <- tilecentroids(letterR, 3, 4) + n <- default.n.tiling(cells) + n <- default.n.tiling(cells, nd=4) + n <- default.n.tiling(cells, ntile=4) + n <- default.n.tiling(cells, ntile=4, quasi=TRUE) + + ## quadrature weights - special cases + ## X <- runifpoint(10, as.mask(letterR)) + X <- runifrect(10, Frame(letterR))[as.mask(letterR)] + gr <- gridweights(X, ntile=12, npix=7) # causes warnings about zero digital area + + ## plot.quad + plot(quadscheme(cells, method="dirichlet", nd=7), tiles=TRUE) + plot(quadscheme(cells, method="dirichlet", nd=7, exact=FALSE), tiles=TRUE) + + ## logistic + d <- quadscheme.logi(cells, logi.dummy(cells, "binomial")) + print(summary(d)) + d <- quadscheme.logi(cells, logi.dummy(cells, "poisson")) + print(summary(d)) + d <- quadscheme.logi(cells, logi.dummy(cells, "grid")) + print(summary(d)) + d <- quadscheme.logi(cells, logi.dummy(cells, "transgrid")) + print(summary(d)) + d <- quadscheme.logi(amacrine, + logi.dummy(amacrine, "binomial", mark.repeat=TRUE)) + print(summary(d)) + d <- quadscheme.logi(amacrine, + logi.dummy(amacrine, "poisson", mark.repeat=FALSE)) + print(summary(d)) + }) + } > > proc.time() user system elapsed 0.85 0.12 0.98