# NOT RUN {
# estimate cdf of nearest neighbour distance in redwood data
G <- Gest(redwood)
# compute estimate of mean nearest neighbour distance
stieltjes(function(x){x}, G)
# estimated probability of a distance in the interval [0.1,0.2]
stieltjes(function(x,a,b){ (x >= a) & (x <= b)}, G, a=0.1, b=0.2)
# stepfun example
H <- spatialcdf(bei.extra$elev, normalise=TRUE)
stieltjes(function(x){x}, H)
# }
Run the code above in your browser using DataLab