New answers tagged

2

You can just use one loop, where you subset the point layer by unique id. Then intersect these subsetted points by polygon with same id. Code below suggesting that there is one polygon for each unique point id, otherwise subset it in same way as points. for (id in unique(points$id)){ id_points <- points[points$id==id,] sp_points <- intersect(...


1

I have posted a code that should work below. If there is an error just tell me and I will adapt it. In your code there are several false assumptions, that's why it is not working. Here is an explanation for the main errors: decile <- quantile(f, probs = c(0.10)) your are trying to calculate deciles for a character. You first have to read in the raster ...


Top 50 recent answers are included