On Mon, Jul 23, 2012 at 2:26 PM, Jose Funes <jefunes at gmail.com> wrote:
Dear list, I have point pattern data and would like to attach/add covariates as raster (image or grid) to it. For example as the case of the bei data with bei.extra with covariates.
You want to get the values of a raster at a set of points? Try extract(points,raster) from the raster package. [or it might be extract(raster,points)]. 'points' is a SpatialPoints object (or SPDataFrame) and 'raster' is a raster or stack object from the raster package. Barry