A quick-and-dirty all spatstat solution:
library(spatstat)
eps <- 10
x <- pixellate(ants, eps = eps)
x[x>0] <- 1
y <- 0*x
s <- eps*c(-1,0,1)
for(i in s){
for(j in s){
y <- y + shift.im(x, vec = c(i,j))
}
}
z <- y
z[z>0] <- 1
plot(solist(x, y, z), main = "")
/Ege
On Tue, 2020-11-10 at
From the documentation of gDistance I would be very suprised if it
confines paths to be inside the polygon. Try to make a simple example
"by hand" and check the calculations.
This is a well studied problem in computer science (search for something
like "shortest path inside polygon"), and
If I understand your question correctly you can simply use the spatstat
function `discs()`. Given `syn.ppp` created from your code the call is
something like:
D <- discs(syn.ppp, radii = marks(syn.ppp)/2, mask = TRUE, eps = 1)
For your dataset this covers almost the entire window if both
Dear Alexandre,
Indeed the solution by Florian below is very nice. If you really want to
go the other direction you can use `as.SpatialGridDataFrame.im()` from
the `maptools` package.
By the way, based on what you write, I think you mean to use the value
7.5 (=0.75m) rather than 0.75
The usual thing I've seen (e.g. in a workshop by Edzer Pebesma) is "You
need the development version of ggplot2...". Of course that can't be
true forever, but maybe it still is.
If you have either the `devtools` or `remotes` package installed you can
just install the GitHub version of `ggplot2`
The `psp` class in spatstat consists of individual line segments and
`selfcrossing.psp` checks whether each individual line intersects one of
the other lines, which happens at all the points in your plot.
If instead you treat each of the two line sequences as a `psp` you can
check find the
At least the typical definition of an inhomogeneous K-function uses a
disc as the structure element and can't capture anisotropy as far as I
can see. It only depends on distance between points and not the vector
difference.
Btw. if you do not assume stationarity of your process I would think
, so I may have some misunderstanding.
Thanks again.
Erin
*From:* R-sig-Geo <r-sig-geo-boun...@r-project.org> on behalf of Ege
Rubak <ru...@math.aau.dk>
*Sent:* November 15, 2017 10:59:05 AM
*To:* r-sig
Hi Erin,
It is not quite clear to me what your data is. From your text I
understand that you have a number of locations where you have measured
the population of a specific insect (count variable?) together with
independent/explanatory variables at these same locations. Is the
"population"
al Message-
From: Rolf Turner [mailto:r.tur...@auckland.ac.nz]
Sent: September 12, 2017 3:45 PM
To: Guy Bayegnak <guy.bayeg...@gov.ab.ca>
Cc: r-sig-geo@r-project.org; adrian.badde...@curtin.edu.au; Ege Rubak
<ru...@math.aau.dk>
Subject: Re: [R-sig-Geo] quadracount on multitype p
10 matches
Mail list logo