R Under development (unstable) (2024-11-01 r87285 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 spatstat.utils/tests/*R > #' > > require(spatstat.utils) Loading required package: spatstat.utils > ALWAYS <- FULLTEST <- TRUE > #' indices.R > #' Tests of code for understanding index vectors etc > #' $Revision: 1.3 $ $Date: 2020/05/11 01:25:34 $ > > if(FULLTEST) { + local({ + + a <- grokIndexVector(c(FALSE,TRUE), 10) + b <- grokIndexVector(rep(c(FALSE,TRUE), 7), 10) + d <- grokIndexVector(c(2,12), 10) + e <- grokIndexVector(letters[4:2], nama=letters) + f <- grokIndexVector(letters[10:1], nama=letters[1:5]) + g <- grokIndexVector(-c(2, 5), 10) + h <- grokIndexVector(-c(2, 5, 15), 10) + + Nam <- letters[1:10] + j <- positiveIndex(-c(2,5), nama=Nam) + jj <- logicalIndex(-c(2,5), nama=Nam) + k <- positiveIndex(-c(2,5), nama=Nam) + kk <- logicalIndex(-c(2,5), nama=Nam) + mm <- positiveIndex(c(FALSE,TRUE), nama=Nam) + nn <- positiveIndex(FALSE, nama=Nam) + }) + } > > > proc.time() user system elapsed 0.18 0.09 0.26