Pair correlation function differences to spatstat.core
Closed this issue · 2 comments
mhesselbarth commented
Hello,
First of all, thank you for continuously working on spatstat
and maintaining this package!
When looking into the new sub-packages, I realized that e.g., the pcf
function seems to be increased by a factor of 100 compared between spatstat.core
and spatstat.explore
.
Is there something I am missing?
library(spatstat.core)
library(spatstat.explore)
data("finpines")
pcf_core <- spatstat.core::pcf.ppp(finpines, divisor = "d", correction = "Ripley")
pcf_explore <- spatstat.explore::pcf.ppp(finpines, divisor = "d", correction = "Ripley")
mean(pcf_core$iso)
#> [1] 1.392257
mean(pcf_explore$iso)
#> [1] 140.3395
sessionInfo()
#> R version 4.2.1 (2022-06-23)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Big Sur ... 10.16
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
#>
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] spatstat.explore_3.0-3 spatstat.core_2.4-4 rpart_4.1.16
#> [4] nlme_3.1-159 spatstat.random_3.0-1 spatstat.geom_3.0-3
#> [7] spatstat.data_3.0-0
#>
#> loaded via a namespace (and not attached):
#> [1] compiler_4.2.1 highr_0.9 tools_4.2.1
#> [4] digest_0.6.30 goftest_1.2-3 evaluate_0.18
#> [7] lifecycle_1.0.3 lattice_0.20-45 mgcv_1.8-40
#> [10] rlang_1.0.6 reprex_2.0.2 Matrix_1.5-1
#> [13] cli_3.4.1 rstudioapi_0.14 yaml_2.3.6
#> [16] xfun_0.34 fastmap_1.1.0 withr_2.5.0
#> [19] stringr_1.4.1 knitr_1.40 fs_1.5.2
#> [22] spatstat.utils_3.0-1 grid_4.2.1 glue_1.6.2
#> [25] rmarkdown_2.17 polyclip_1.10-4 deldir_1.0-6
#> [28] magrittr_2.0.3 tensor_1.5 htmltools_0.5.3
#> [31] splines_4.2.1 abind_1.4-5 spatstat.sparse_3.0-0
#> [34] stringi_1.7.8
Created on 2022-11-09 with reprex v2.0.2
baddstats commented
Thank you for spotting this bug. It will be fixed shortly.
mhesselbarth commented
Fixed by 57181c7.
library(spatstat.core)
library(spatstat.explore)
data("finpines")
pcf_core <- spatstat.core::pcf.ppp(finpines, divisor = "d", correction = "Ripley")
pcf_explore <- spatstat.explore::pcf.ppp(finpines, divisor = "d", correction = "Ripley")
mean(pcf_core$iso)
#> [1] 1.392257
mean(pcf_explore$iso)
#> [1] 1.403395
Created on 2022-11-10 with reprex v2.0.2