I'm using the rasterize command in the raster package to rasterize polygon
data and can't seem to get the rasterize routine to recognize the field
parameter.  Here's a working example which illustrates the problem:

#load libraries
library(raster)
library(spgwr)

#load data
data(georgia)

#confirm TotPop90 values
range(gSRDF$TotPop90)

#build raster data
rasdef<-raster(extent(gSRDF), nrow = 100, ncol = 100)
rasvals<-rasterize(gSRDF, rasdef, field = gSRDF$TotPop90)
rasvals

If we compare the minimum and maximum values reported in the rasvals output
to the values reported in the range(gSRDF$TotPop90), it is clear that they
aren't the same.  Simply put, the rasterize command seems to be spitting
out the observation numbers rather than the values associated with the
TotPop90 variable.

In the case of SpatialPolygon data, the values input via the field
parameter are passed to the .polygonsToRaster function.  Playing around
with this, I've discovered that I get the expected results by doing the
following:

rasvals<-raster:::.polygonsToRaster(gSRDF, rasdef, gSRDF$TotPop90)

Any thoughts as to why I can't do this using rasterize in the usual way?

Adam

	[[alternative HTML version deleted]]

