Skip to content
Prev 5281 / 7420 Next

Create a grid and extract species and climate data

Hi Buddhi,

Assuming your climate data are represented as a series of rasters and 
your species occurrences have latitude and longitude coordinates, you 
can accomplish both of these things with the raster package.  Using one 
of the climate rasters as a reference raster, you can use the function 
cellFromXY() to determine species presence/absence in your cells. And 
the extract() function in raster can be used to get the climate values 
from climate data rasters.

Hope this helps.
Adam
On 2/3/2016 2:32 AM, Frederico V. Faleiro wrote: