Displaying 20 results from an estimated 1200 matches similar to: "SPATSTAT: Minimum points for a Ripley K to be sensible?"
2005 Oct 10
3
Vectorizing loop
Hi
I have the following loop and would like to vectorize it. Any ideas if
it is possible?
Thanks,
Rainer
Tha Loop:
for (i in 2:Result$NoSims)
{
ppp <- runifpoint(Result$NoPlants)
K <- Kest(ppp)
Result$LSim[i,] <- sqrt(K$iso / pi) - K$r
CM <- (Result$LSim[i,] * Result$LSim[i,]) / abs(K$r[2] - K$r[1])
Result$SigCM[i] <- sum(CM, na.rm=TRUE)
print(i)
flush.console()
}
2005 Sep 01
2
SpatStat Kest - Error Message help
Hi I'm working with the function Kest in the package SpatStat (under LINUX
with R 2.1.0). In order to evaluate the statistical significance of my
point pattern I'm doing 999 Montecarlo replications. The script that use
the Kest function runs OK for most of the different point patterns that I
have but for a particular point pattern, which have only 17 points, it
runs until the 34th
2004 May 29
1
Rhelp: Need help interpreting plots in spatstat
Hello everybody--
I have been playing with my data in spatstat, and what I'd like to
present is a basic exploratory spatial analysis. I have used the
following code, using a ppp.object called tsdspoints. The code
develops the simulations and the envelopes I want, but I don't
understand my first plot here, the [tsds.ghat.short$r,
tsds.ghat.short$raw]...I cobbled together this code
2008 Mar 04
1
Ripley's K function within envelope--how to change the maximum distance?
Hi--I'm trying to run a Ripley's K analysis on a point pattern within a window
of 1 square km. The maximum distance I want to use is the diagonal of the
window, around 1400m, run in 50m increments.
The function defaults to a 250m maximum--I thought this was simply the way I had
plotted it, but when I exported the data there was nothing over 250m.
I've looked into seq and ginterval,
2006 Feb 27
2
about"Riply's K function"and "envelope"
hi!
I did Riply's K function and envelope in the package "SPATSTAT". When the
species number is less, it can work well and it is quickly. But when the
species number is more(example:2000), it told me"memory limit". So I change
"memory limit". But the speed is very slow. I took 13 hours to run the
programe.
Perhaps there are other methods that can do it. Or just
2005 Oct 10
5
Show Progress in loop
Hi
I have a loop which is doing time consuming calculations and I would
like to be able to have some feedback on where it is in it's
calculations. I tried to simply show the counter variable in the loop,
but id doesn't work as all display seems to be delayed until the loop is
completed. Is there any way of displaying the progress of a loop?
Rainer
The loop:
for (i in
2013 Feb 07
2
Spatstat - Kest, envelope problem
Hello,
I am writing cause I have a problem when try to create confidence envelopes
in spatstat.
I have a point data representing firms in my study area.
When I try to create confidence envelopes the error message turns up:
[> p <- envelope(point, fun=Kest, nsim=99)
Error in marks.ppp(Y, dfok = FALSE) :
Sorry, not implemented when the marks are a data frame]
Could you write me how can I
2003 Oct 20
0
calculating K-function (Kest) in spatstat
Dear R-helpers,
After putting my somewhat sparse (21 points) data into a 'ppp' format, I am
unable to calculate the K function using Kest. I get the error "some 'x' not
counted; maybe 'breaks' do not span range of 'x' ". So I tried to calculate
the K function using the swedishpines dataset. Of course Kest(swedishpines)
works fine but when i break it
2006 Jan 12
1
envelopes of simulations
Hello!
I am writing you because I could not plot the confidence envelopes for
functions Jest, Jcross, Jdot, Jmulti, and L, using the Spatstat package.
I have already understood how to do that for Kest or Jest, that is:
JEnv <- plot(envelope(PPPData, Jest))
Where PPPData is my ppp object.
However, for Jcross I must specify the two marks I want to analyse.
That is, usually I would get the
2007 Dec 09
1
spatstat questions
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071209/130cf9d6/attachment.pl
2010 Apr 14
1
envelope in spatstat
Hi R users,
This query is regarding the use of the 'envelope' function in Spatstat.
My data can be represented as a point process with CONTINUOUS marks:
points <- ppp(x=x,y=y, marks=m, window= wind)
However the marks are alignments (lines), and so have to be treated
differently to normal scalar marks. Hence to create a mcf object with the
appropriate test function for alignment
2005 Sep 30
2
Creating an array [0 to 101] of a list
Hi
I looked, but I didn't find it:
I need an array [0 to 101] where each element is a list (the result of
Kest in spatstat).
I.e. I want to do:
A[2] <- Kest(pp1)
A[3] <- Kest(pp2)
...
A[101] <- Kest(pp100)
How can I create A ?
Rainer
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Department of Conservation Ecology
University of Stellenbosch
Matieland
2007 Mar 26
2
sampling from the uniform distribution over a convex hull
Ranjan Maitra writes:
> Does anyone have a suggestion (or better still) code for sampling
> from the uniform distribution over the convex hull of a set of
> points?
This is implemented in library 'spatstat'.
If x and y are vectors of coordinates of your initial set of points,
library(spatstat)
W <- convexhull.xy(x, y)
P <- runifpoint(42, W)
will compute
2005 Dec 29
3
importing shapefiles into spatstat
Dear R users,
I am using spatstat to analyze point patterns (tree locations). I would
like to import the shapefile with the study area polygons (six total) into R
and use it to create the window for the spatstat analysis. I do not simply
want to use a rectangle because the study areas spread out over 40000 ha.
Any suggestions would be greatly appreciated.
Thanks,
Charlotte Reemts
Charlotte
2007 Oct 03
2
Speeding up simulation of mean nearest neighbor distances
I've written the function below to simulate the mean 1st through nth
nearest neighbor distances for a random spatial pattern using the
functions nndist() and runifpoint() from spatsat. It works, but runs
relatively slowly - would appreciate suggestions on how to speed up
this function. Thanks. --Dale
library(spatstat)
sim.nth.mdist <- function(nth,nsim) {
D <- matrix(ncol=nth,
2017 Nov 28
0
Extract all point in a quadrats by spatstat package
Hi,
With the following code i can divides window into quadrats and counts the numbers of points in each quadrat.
library(spatstat)
X <- runifpoint(50)
quadratcount(X)
quadratcount(X, 4, 5)
quadratcount(X, xbreaks=c(0, 0.3, 1), ybreaks=c(0, 0.4, 0.8, 1))
qX <-? quadratcount(X, 4, 5)
plot(X)
plot(qX, add=TRUE)
But I want to mark each? quadrats? and select/ extract only those points by
2009 Feb 20
0
Random labeling hypothesis in spatstat
Hi,
I am trying to test the random labeling hypothesis with my data. I have a point pattern of bird nests and each nest has a mark that it is either predated or not-predated. I want to test the null hypothesis that the K distribution of predation events is equal to the K distribution of all events (nests). This is the code I am using:
Kdif <- function(X,...,i) {
Kidot <-
2013 Mar 21
3
spatstat error
Good day
Im working with some coordinates, and want to create a PPP object, I found
that error:
> Datos=read.table("puntos_texto.txt",dec=".",sep="\t",header=T)
> summary(Datos)
id y x
Min. : 1.0 Min. :1013581 Min. :1177842
1st Qu.: 821.2 1st Qu.:1014442 1st Qu.:1179658
Median
2007 Apr 27
1
Quadratcount() plotting in R spatstat
Hello,
I am trying to plot a quadratcount object over a ppp object in the spatstat
package. I ultimately want to get something like this
http://bg9.imslab.co.jp/Rhelp/R-2.4.0/src/library/spatstat/man/images/big_quadratcount_001.png
http://bg9.imslab.co.jp/Rhelp/R-2.4.0/src/library/spatstat/man/images/big_quadratcount_001.png
See
2008 May 09
1
save to file
Hi,
I am new to R. I am using spatstat package to generate some sample points but don't know how to save the result to file. Could anyone please give me some instructions? Thanks
I generate some random point data by using:
pp<-runifpoint(100)
I can plot it out with plot(pp)
I suppose that pp contains x and y. How can I save these x, y pairs to file that has following format?
x1,y1
x2,y2