Questions tagged [spatstat]

spatstat is an R package for analysing spatial data, mainly Spatial Point Patterns.

spatstat is an R package for analysing spatial data, mainly Spatial Point Patterns. It also supports three-dimensional point patterns, and space-time point patterns in any number of dimensions. The package contains over 1000 functions for plotting spatial data, exploratory data analysis, model-fitting, simulation, spatial sampling, model diagnostics, and formal inference. Data types include point patterns, line segment patterns, spatial windows, pixel images and tessellations.

Resources:

441 questions
0
votes
3 answers

Plot points and polygons in single window in spatstat

I am attempting to plot coordinate data that includes both polygons and points (in separate files) in a single window so that I can later run tests to see what patterns exist. I am fairly new to R (and very new to spatstat) so I really appreciate…
EML
  • 1
  • 1
  • 1
0
votes
1 answer

where do I find the definition of class objects in spatstat

I would like to know what kind of information an object of class Spatialpolygons has versus an object of class Polygons.
Miguel
  • 1
0
votes
1 answer

Using point coordinates and diameter to calculate areal projection of points

I have data on a number of ecological variables associated with spatial points. Each point has x & y coordinates relative to the bounding box, however the points represent circular areas of varying diameter. What I'm trying to achieve is to project…
Anna Krystalli
  • 413
  • 3
  • 13
0
votes
2 answers

Error in as.owin Handling shape files in the spatstat package R

I´m trying to follow the tutorial "Handling shape files in the spatstat package" by Adrian Baddeley where a shape as SpatialPolygonsDataFrame is converted to a collection of owin´s. The key attributes of shape are summarized below and my objective…
Joao Carlos
  • 27
  • 1
  • 4
0
votes
1 answer

Exporting GIS line vector data (roads) to R with intention to use it for network K-function

I am still a beginner to R and I have the following problem. Any tips will be highly appreciated - it will be a big help to start off. I have a road shapefile for one country in ArcGIS, that I would like to use as a network variable in R to apply…
mihoo
  • 157
  • 3
  • 12
0
votes
0 answers

Point Patterns in Spatstat

I am having a few problems with creating a point pattern in the R package Spatstat. > HI06mfav <- read.table("MarHI06mfav.txt", header = TRUE) > attach(HI06mfav) The following object(s) are masked _by_ '.GlobalEnv': x, y The following object(s)…
0
votes
2 answers

Bootstrap output matrix missing

When I try to calculate Gest in spatstat I get the error: bootstrap output matrix missing. Does anyone know what am I doing wrong?
Miguel
  • 1
0
votes
1 answer

R: spatstat: Residual analysis for Thomas cluster processes

I wish to test the fit of a homogeneous Thomas cluster process, ideally using residual plots like diagnose.ppm and qqplot.ppm. Since the most straightforward way to fit a Thomas cluster process is using kppm, I can't use the above functions. Can…
0
votes
2 answers

Error importing data into R and spatstat

I'm trying to import a text file into R, specifically the spatstat package. I've loaded a shp file as the window and that worked just fine (displays with plot() ). I can't get the ppp() command to run though. I keep getting this error after…
Josh
  • 3,385
  • 5
  • 23
  • 45
0
votes
2 answers

How to generate a list of segments from a list of random self-intercepting lines (psp in R)?

I'm using X=rpoisline(4) to generate lines and plot them with plot(X). With X$ends I have their coordinates and their intersection points with selfcrossing.psp(X) (In R with spatstat : library(spatstat)). I need to get a list of segments and their…
0
votes
1 answer

if distance from one point to others is less than certain amount, how do I tell it to change the mark of the points?

I am using the package spatstat. I have a data frame of coordinates that I have divided into two sets, healthy(Mark=no) and diseased(Mark=yes). I am able to find the distance between the diseased point and all of the other…
0
votes
1 answer

Plotting points on a psp object based on distance

I have a distance sequence, which I would like to plot of a line in spatstat. Example: library(spatstat) x <- c(0.3, 5) y <- c(3, 1.2) range.x <- c(0, max(x)+0.2) range.y <- c(0, max(y)+0.2) owin <- owin(range.x, range.y) the.line <- psp(x0 =…
Mikko
  • 7,530
  • 8
  • 55
  • 92
-1
votes
2 answers

Unit of a gaussian smoothing of an image

I had a raster with values from 0 to 0,3 which I transformed into an image. Then i gave all values <=0.3 the value 1. I thought it makes it easier if i calculate this for a single value. I applied Gaussian smoothing to the image and then converted…
Maik
  • 1
  • 1
-1
votes
1 answer

Create new data frame from nearest neighbour marks in Spatstat

I have a .ppp object of trees in a forest. It has two marks: ash disease and species codes. The ash disease obviously only affects the ash trees; the column reads "NA" for the rest of the species. Nevertheless, I want to extract the four nearest…
-1
votes
1 answer

Inhomogeneous K-function to indicate need for spatial dependence/interaction term in Poisson point process model

I am mapping and modelling a disease of sheep. I have approx 4200 point locations in my dataset, each of which represents the centroid of a given sheep farm. I have created a K-function difference plot (below) to assess whether my disease-positive…
1 2 3
29
30