Rodrigo,

This is an old and quite basic Krig, my data was continuous  
measurements in lat, long so binned first.

library(geoR)

counts<-bins2d(long, lat,bin=c(0.1,0.1),plot=FALSE, nlevels=15,  
color.palette=heat.colors, xaxs='i', yaxs='i', las=1, main='')
countsgeo<-as.geodata(counts)
xrange<-seq(range(countsgeo$coords[,1])[1],range(countsgeo$coords[,1]) 
[2], by=bin[1])
yrange<-seq(range(countsgeo$coords[,2])[1],range(countsgeo$coords[,2]) 
[2], by=bin[2])

loci<-expand.grid(x=range(counts,y=yrange) #krig grid

kc <- krige.conv(countsgeo, loc=loci,
                  krige=krige.control(cov.pars=c(1, .25))) #can fine  
tune

color.palette<-rainbow #use heat etc.
contour(kc,asp=1, col=col<- 
c("#FFFFF",color.palette(length(levels)-1)) , add=TRUE) #makes 0  
counts white



You could also use image or other 3d graphics.

Hope that Helps,

Jon Loehrke
Graduate Research Assistant
Department of Fisheries Oceanography
School for Marine Science and Technology
University of Massachusetts
200 Mill Road, Suite 325
Fairhaven, MA 02719
jloehrke@umassd.edu


	[[alternative HTML version deleted]]

