[R-sig-Geo] Creating presence/absence from grid cells & polygons

Barnabas Daru darunabas at gmail.com
Thu Jan 23 12:53:39 CET 2014


Dear list members,
I will like to create a presence/absence matrix using R where rows represent grid cells and columns species. 

I have a set of overlapping polygons each representing the distribution of different species and grid cells (also shapefiles generated using fishnet tool in ArcMap) to show presence or absence of species within the grid cells. 

In Arcmap, I was able to do this successfully for few species as follows:
(1) I merged the polygons
(2) I performed spatial intersect of the merged maps on the grid cells
(3) From the result, I used the dataframe (dbf) of the intersect to create the presence absence matrix using the function sample2matrix in the R package picante. The 3 columns of the dataframe are:
plots | abundance | species

However, given the number of merged maps (over 200 overlapping polygons), the analysis in Arcmap got stalled and never proceed to completion. 
I will therefore like to do this in R. 
I will greatly appreciate any R code to help me do this. 

Thanks and kind regards
Barnabas



More information about the R-sig-Geo mailing list