vermicellion
vermicellion

Reputation: 389

create kernel density raster where locations are duplicated (a lot!)

I have a dataset identifying locations of individuals at stationary receivers. So, I have many, many duplicated locations (multiple locations at one receiver over multiple days). I am trying to run a kernel density estimation in R. using weights on points so that they are not duplicated:

density_raster <- density(points_spatstat, weights = points_spatstat$marks,
                          sigma = 800, edge = TRUE)

But I keep getting the error:

Error in density.default(points_spatstat, weights = points_spatstat$marks,  : 
  argument 'x' must be numeric
In addition: Warning message:
In density.default(points_spatstat, weights = points_spatstat$marks, 
    sigma = 800, edge = TRUE) :
 extra arguments ‘sigma’, ‘edge’ will be disregarded 

The values I am calling are numeric. I am suspecting that having many duplicate locations is causing this issue. How can I resolve this? My dataset has 804193 rows.

Upvotes: 0

Views: 17

Answers (0)

Related Questions