Creating polygonal windows for spatial analysis in r

المشرف العام

Administrator
طاقم الإدارة
I am attempting to normalize a spatial point pattern using a population density raster in r. My problem is that the function I am trying to run is recognizing the "white space" around the raster I am using as "NA", giving me the error message: Values of the covariate ‘Y’ were NA or undefined at 32% (19493 out of 60241) of the quadrature points. Occurred while executing: ppm.ppp(X, ~offset(log(Y)), covarariates = list(Y)).

Is there a way to create a window or data frame that traces the outline of my raster set? It should be noted that I am a grad student with very limited experience using r. Any help would be very much appreciated!

library(spatstat) library(maptools) library(raster) library(geostatsp) library(rgdal) X
 
أعلى