Takes output from get_occurrences_ala or get_occurrences_gbif, and rasterizes the occurrences into 10min (ca. 18km2). At the moment rasterizing uses only this fixed resolution, which is the coarsest resolution for WorldClim data (see http://www.worldclim.org/version1). The result is a dataframe with latitude and longitude of the midpoints of the raster cells where the species occurs at least once.

rasterize_occurrences(spdat, return_raster = FALSE)

Arguments

spdat

A dataframe returned by get_occurrences_ala or get_occurrences_gbif, or simply a dataframe with 'species', 'longitude', and 'latitude' (species is required).

return_raster

Logical (default FALSE). If TRUE, return the raster object, instead of the raster converted to a dataframe with midpoint coordinates.

Examples

# NOT RUN {
o <- get_occurrences_ala("Eucalyptus botryoides")
r <- rasterize_occurrences(o)
# }