- using R Under development (unstable) (2025-11-23 r89052)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
Debian clang version 21.1.5 (1)
Debian flang version 21.1.5 (1)
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘echelon/DESCRIPTION’ ... OK
- this is package ‘echelon’ version ‘0.4.0’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [0s/1s] OK
- checking package namespace information ... OK
- checking package dependencies ... INFO
Package suggested but not available for checking: ‘mapview’
- checking if this is a source package ... OK
- 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 ‘echelon’ can be installed ... OK
See the install log for details.
- used C++ compiler: ‘Debian clang version 21.1.5 (1)’
- checking package directory ... OK
- checking for future file timestamps ... 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 ... [0s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the package can be unloaded cleanly ... [0s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [0s/1s] OK
- checking loading without being on the library search path ... [0s/0s] 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 ... [13s/16s] OK
- checking Rd files ... [0s/1s] 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 line endings in C/C++/Fortran sources/headers ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compilation flags used ... OK
- checking compiled code ... OK
- checking examples ... [2s/2s] ERROR
Running examples in ‘echelon-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: echebin
> ### Title: Echelon spatial scan statistic based on Binomial model
> ### Aliases: echebin
> ### Keywords: echelon analysis spatial scan statistic spatial cluster
> ### deteciotn
>
> ### ** Examples
>
> ##Hotspot detection for non-white birth in North Carolina using echelon scan
>
> #Load required packages and data
> library(spData)
To access larger datasets in this package, install the spDataLarge
package with: `install.packages('spDataLarge',
repos='https://nowosad.github.io/drat/', type='source')`
> data("nc.sids")
>
> #Non-white birth from 1974 to 1984 (case data)
> nwb <- nc.sids$NWBIR74 + nc.sids$NWBIR79
>
> #White birth from 1974 to 1984 (control data)
> wb <- (nc.sids$BIR74 - nc.sids$NWBIR74) + (nc.sids$BIR79 - nc.sids$NWBIR79)
>
> ##Hotspot detection based on Binomial model
> #Echelon analysis
> SIDS.echelon <- echelon(x = nwb/wb, nb = ncCR85.nb, name = row.names(nc.sids))
19 echelons are created
See the objects 'Table' and 'Echelons' for more details
>
> #Basic cluster detection (significance not evaluated)
> SIDS.clusters <- echebin(SIDS.echelon, cas = nwb, ctl = wb, K = 20,
+ n.sim = 0, cluster.info = TRUE, main = "Hgih rate clusters", ens = FALSE)
dev.new(): using pdf(file="Rplots1.pdf")
------------- CLUSTERS DETECTED -------------
Number of locations ......: 100 region
Limit length of cluster ..: 20 regions
Total cases ..............: 240380
Total population .........: 752354
Scan for Area with .......: High Rates
Number of Replications ...: 0
Model ....................: Binomial
---------------------------------------------
MOST LIKELY CLUSTER -- 20 regions
Cluster regions included : Halifax, Gates, Edgecombe, Martin, Washington, Vance, Chowan, Granville, Franklin, Greene, Lenoir, Northampton, Bertie, Hertford, Warren, Wilson, Jones, Pitt, Durham, Perquimans
Population ..............: 98424
Number of cases .........: 54019
Expected cases ..........: 31446.847
Observed / expected .....: 1.7178
Relative risk ...........: 1.9258
Log likelihood ratio ....: 12804.6298
----------------------------------------------
SECONDARY CLUSTERS
2 -- 3 regions
Cluster regions included : Robeson, Hoke, Scotland
Population ..............: 25048
Number of cases .........: 17604
Expected cases ..........: 8002.9324
Observed / expected .....: 2.1997
Relative risk ...........: 2.2945
Log likelihood ratio ....: 8004.2121
3 -- 1 regions
Cluster regions included : Anson
Population ..............: 3445
Number of cases .........: 2113
Expected cases ..........: 1100.6908
Observed / expected .....: 1.9197
Relative risk ...........: 1.9279
Log likelihood ratio ....: 628.1941
4 -- 1 regions
Cluster regions included : Mecklenburg
Population ..............: 52345
Number of cases .........: 19658
Expected cases ..........: 16724.4291
Observed / expected .....: 1.1754
Relative risk ...........: 1.191
Log likelihood ratio ....: 396.0322
5 -- 1 regions
Cluster regions included : Caswell
Population ..............: 2288
Number of cases .........: 1147
Expected cases ..........: 731.0248
Observed / expected .....: 1.569
Relative risk ...........: 1.5718
Log likelihood ratio ....: 162.5374
----------------------------------------------
Display only the top 5 clusters. See object 'clusters' for more details
> text(SIDS.echelon$coord, labels = SIDS.echelon$regions.name,
+ adj = -0.1, cex = 0.7)
>
> #Detected clusters and neighbors map
> #XY coordinates of each polygon centroid point
> NC.coo <- cbind(nc.sids$lon, nc.sids$lat)
> echebin(SIDS.echelon, cas = nwb, ctl = wb, K = 20,
+ n.sim = 0, coo = NC.coo, dendrogram = FALSE)
dev.new(): using pdf(file="Rplots2.pdf")
MOST LIKELY CLUSTER -- 20 regions
Cluster regions included : Halifax, Gates, Edgecombe, Martin, Washington, Vance, Chowan, Granville, Franklin, Greene, Lenoir, Northampton, Bertie, Hertford, Warren, Wilson, Jones, Pitt, Durham, Perquimans
Population ..............: 98424
Number of cases .........: 54019
Expected cases ..........: 31446.847
Observed / expected .....: 1.7178
Relative risk ...........: 1.9258
Log likelihood ratio ....: 12804.6298
>
> #Load geospatial information for North Carolina
> nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"))
Reading layer `nc' from data source
`/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/sf/shape/nc.shp'
using driver `ESRI Shapefile'
Simple feature collection with 100 features and 14 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
Geodetic CRS: NAD27
>
> #Extract detected clusters
> MLC <- SIDS.clusters$clusters[[1]]
> Secondary <- SIDS.clusters$clusters[[2]]
>
> #Assign colors to clusters for plotting
> cluster.col <- rep(0, length(nwb))
> cluster.col[MLC$regionsID] <- 2
> cluster.col[Secondary$regionsID] <- 3
>
> #Plot detected high-rate clusters on a simple map
> plot(nc$geom, col = cluster.col,
+ main = "Detected high rate clusters")
> legend("bottomleft",
+ legend = c(
+ paste("1- p-value:", MLC$p),
+ paste("2- p-value:", Secondary$p)
+ ),
+ text.col = c(2, 3)
+ )
>
> #Interactive map visualization with mapview
> library(mapview)
Error in library(mapview) : there is no package called ‘mapview’
Execution halted
- checking PDF version of manual ... [7s/9s] OK
- checking HTML version of manual ... [1s/1s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR