Hi,
You could use over( ) function in order to compute the number of different species. You could also use spatstat::marktable Some ideas here: https://stat.ethz.ch/pipermail/r-sig-geo/2011-May/011722.html In vegan package, you can find a Simpson and Shannon diversity calculation function: vegan::diversity 2012/7/2 Barnabas Daru <daruna...@gmail.com> > Dear All, > > I write to ask if anyone has an R code to calculate species richness per > quarter degree grid. > > > > I have a set of polygon shapefiles showing distribution of different > species within a country. > > I would like to first create quarter degree grids over the entire country > and using the polygon shapefiles, to extract species richness per grid. > > > > Any help with R code would be highly appreciated. > > Barnabas Daru > > > \-/ > /\ > /--| > /---/ Barnabas Daru > |--/ PhD Student, > \-/ African Centre for DNA Barcoding, > /\ University of Johannesburg, > /--\ PO Box 524, Auckland Park, 2006, > |---\ South Africa. > \---\ Lab: +27 11 559 3477 > \--| Mobile: +277 3818 9583 > \-/ Website: http://acdb.co.za/index.php?page=mr-barnabas-h-daru > /\ > /--\ > > # if you can think it, you can do it. > > > > > > > > > > > > > > > > > > > [[alternative HTML version deleted]] > > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > > [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo