Dear all,

I'm not getting the output I'm expecting when using distfun() from the spatstat package. Any idea what is going wrong?

Best regards,

Thierry

library(spatstat)
w <- owin(xrange = c(-10, 10), yrange = c(-10, 10))
P <- ppp(x = 0, y = 0, window = w)
P1 <- ppp(x = 1, y = 0, window = w)
P2 <- ppp(x = 1:2, y = c(1, 1), window = w)
P3 <- ppp(x = 2:1, y = c(2, 2), window = w)
f <- distfun(P)
f2 <- distfun(P2)
fo <- list(f(P1), f(P2), f(P3))
fo2 <- list(f2(P), f2(P1), f2(P3))

> fo
[[1]]
[1] 0

[[2]]
[1] 1 1

[[3]]
[1] 1 1

> fo2
[[1]]
[1] 0

[[2]]
[1] 0

[[3]]
[1] 1 1

> sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=nl_BE.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=nl_BE.UTF-8        LC_COLLATE=nl_BE.UTF-8
 [5] LC_MONETARY=nl_BE.UTF-8    LC_MESSAGES=nl_NL.UTF-8
 [7] LC_PAPER=C                 LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=nl_BE.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] spatstat_1.25-1 deldir_0.0-16   mgcv_1.7-12

loaded via a namespace (and not attached):
[1] grid_2.14.1    lattice_0.20-3 Matrix_1.0-3   nlme_3.1-102


	[[alternative HTML version deleted]]

