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
2
votes
1 answer

Relrisk function and bandwidth selection in spatstat

I'm having trouble interpreting the results I got from relrisk. My data is a multiple point process containing two marks (two rodents species AA and RE), I want to know if they are spatially segregated or not. > summary(REkm) Marked planar point…
Patrick
  • 23
  • 4
2
votes
1 answer

Interpreting spatial relationships between points with different marks (multitype point pattern) - using spatstat - and better visualize the results

Let me start off by mentioning that I have no training in statistics and I am new in this field for both spatial statistics and coding in R. However, I am trying to learn how to identify and characterize the spatial distribution of point plotted…
sdmclin
  • 31
  • 3
2
votes
2 answers

Crating Kernel density estimate for polygon in R

I Have a shapefile of polygons and another one of points that are distributed over the polygons. I would like to create a kernel density estimate for each polygon based on the points it contains. unfortunately I was only able to create squared KDEs…
Naama
  • 39
  • 4
2
votes
0 answers

Is there a way to specify the number of segments crossings when creating random pattern of line segments?

I have been using the spatstat package to determine if a point pattern is clustered, random or regular by comparing it to relative frequency distribution of nearest-neighbor distances generated under complete spatial randomness (CSR). Code is as…
RFrap
  • 21
  • 2
2
votes
1 answer

Set maximum length for generating Delaunay graph in R

I was trying to generate Delaunay triangulation in R using the spatstat function 'delaunay'. However, I checked the documentation and seems there is no argument to set the maximum length. I noticed this post: How to set maximum length of triangle…
DigiPath
  • 179
  • 2
  • 10
2
votes
1 answer

Convert SpatialPolygonsDataFrame to projected coordinates using spTransform

Im trying to do a point pattern analysis. To do this I have to convert a SpatialPolygonsDataFrame so it contains projected coordinates instead of curved coordinates. However I keep getting the same error: Error in…
Sara
  • 33
  • 3
2
votes
1 answer

data frame object to use as as.linnet object

I have a data.frame object which I can easily convert to a spatialpointdataframe then convert that to a spatiallinesdataframe but then when I tried to cover to a as.linnet it does not read marks X Y roadID 1 177321.3 3378163 1 2…
iHermes
  • 314
  • 3
  • 12
2
votes
1 answer

R function for creating discs around each point in a pattern, then counting number of points in each disc [spatial]

I am attempting to create a disc for each point in a pattern; each disc will have the same radius. Then for each disc, I want to count the number of points falling within the disc. Each pattern has 100-400 points. I have written code to do this, but…
2
votes
2 answers

weighted median in spatstat package

The weighted.median() function in the spatstat package returns "10.5", when I pass the evenly weighted scores of 10, 11, & 12. I was expecting the response of "11" (which is the output of stats::median() and matrixStats::weightedMedian()). The…
wibeasley
  • 5,000
  • 3
  • 34
  • 62
2
votes
2 answers

How can I create a linnet object starting from an sf object with LINESTRING geometry column?

At the moment I'm working on a project with point pattern events on a linear network (car crashes) and I'm reading chapter 17 of spatstat book: "Spatial Point Patterns: Methodology and Applications with R". The authors of the book explain that they…
agila
  • 3,289
  • 2
  • 9
  • 20
2
votes
0 answers

multiple comparison with spatstat

I'm running a spatial model using spatstat. Following model fitting, I would like to compare predictions at a few distances and say whether they are significantly different from each other. In the basis of the dataset, I have a bunch of points…
user2602640
  • 640
  • 6
  • 21
2
votes
2 answers

Analyzing octopus catches with LinearK function in R

I hope you can help me with this problem i can't find how to overcome. Sorry if I made some mistakes while writing this post, my english is a bit rusty right now. Here is the question. I have .shp data that I want to analyze in R. The .shp can be…
Alberto Mnemon
  • 117
  • 4
  • 14
2
votes
2 answers

R package spatstat: How to use point process model covariate as factor starting with shape file

I have a question similar to this one from 2014, which was answered but the datasets are no longer available and our original data structures differ. (I'm in crunch time and stumped, so if you're able to respond quickly I would greatly appreciate…
treedm
  • 33
  • 5
2
votes
2 answers

Spatstat: Inhomogeneous Lcross leads to strange plot, despite inhomogeneous point pattern according to quadrat count tests

I am unsure of the validity of a point pattern analysis I am attempting using the inhomogeneous L-cross function with simulation envelopes to test for spatial association between two types of points. A plot of the simulation envelope vs. observed…
Birch14
  • 23
  • 2
2
votes
1 answer

Legend in ppp plot

I´m creating a spatial map of trees based on x-y location using the spatstat package and the ppp function. I´ve been able to do this and the size of each point is based on tree diameter. What I haven´t been able to do, and I hope to find some help…
1 2
3
29 30