# [R-sig-Geo] Calculating envelopes for a point pattern on a linear network (equivalent to rshift in 2D)

Dear list members,

We have a bivariate point pattern (two tree species) in a linear
transect and would like to obtain a null model equivalent to the one
provided by rshift in 2D to test the independence of both populations
(in spatstat)

We are using spatstat, but this option does not seem available at the
moment, or we can't find it (the option available tests the complete
spatial randomness of one population (p) once the other population is
fixed (s) but does not keep the pattern of the second population (p)
unchanged- which is a problem because both populations are clustered in
our case)

An example of our code follows:

T1 is a point pattern on a linear transect as follows:
> T1
Point pattern on linear network
232 points
Multitype, with possible types: p, s
Linear network with 2 vertices and 1 line
Enclosing window: rectangle = [-1, 101] x [-1, 1] units

We used multiple pair correlation functions (linearpfccross)

We computed an envelope to test the hypothesis of complete spatial
randomness and independance:
T1.env = envelope.lpp ( T1, fun = linearpcfcross , nsim = 30 , i = "s",
j = "p")

If anybody has experienced a similar problem or has some hints on how to
proceed we would be very grateful