[R-sig-Geo] How to obtain individual values of transformed Ripley's function local L(r) at a fixed distance r?

Roger Bivand Roger.Bivand at nhh.no
Thu Dec 4 08:18:15 CET 2008


On Thu, 4 Dec 2008, Ophelia Wang wrote:

> Hi again,
>
> To be more specific, my question is: I get an output as a list of values 
> labeled from 1 to 600 (let's say I
> have 600 data points), but I am not sure how these labeled numbers are 
> generated. Is
> there a way to know how these labels correspond to my data points, or do they 
> just
> correspond to the order of my data points when they are read by R?--

Try the examples:

library(spatstat)
data(ponderosa)
X <- ponderosa
L <- localL(X)
r206 <- L$r[206]
L12a <- sapply(L, function(x) x[206])[1:108]
names(L12a) <- NULL
L12 <- localL(X, rvalue=r206)
all.equal(L12, L12a)

The values of L12 are in the same order as the points in X. I can't see 
that any re-ordering is occurring.

Hope this helps,

Roger


>
> Ophelia
>
> Quoting Ophelia Wang <opheliawang at mail.utexas.edu>:
>
>> Hi all,
>> 
>> I am using the spatstat package in R to compute local L function, the
>> transformed Ripley's k. I am interested in getting the estimated local
>> L(r) value for each data point at a fixed distance r. I know I can run
>> localL and then generate a plot to show an overall pattern of all the
>> data points combined, but is there a way to get these local L(r)
>> estimate values so they can be copied or exported into a table? Thanks
>> a lot!
>> 
>> Ophelia
>> -- 
>> 
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list