I realized that in my last email, there is a small typo.

This is the correct call to the envelope function

dens=density(U)
nn=npoints(A)/npoints(U)
intens= eval.im(dens*nn)
r=seq(0,15000,by=250) # because my points are spaced apart in 250m intervals
and I am not interested in clustering at distances greater than 15k
e=expression(rpoispp(intens))
res=(envelope(A, Kinhom, lambda=intens, r=r, simulate=e,nsim=99,
correction="Ripley", verbose=FALSE))

	[[alternative HTML version deleted]]

