image.count {fields}  R Documentation 
Discretizes a matrix of 2d locations and counts the number of occurrences for each grid box.
image.count(x, grid=NULL, nrow=64, ncol=64,...)
x 

grid 
A list with components x and y of equally spaced values describing the centers of the grid points. The default is to use nrow and ncol and the ranges of the data locations (x) to construct a grid. 
nrow 
Number of rows for the image. Note that nrows equals the number of x values and corresponds to the horizontal dimension. 
ncol 
Number of columns for the image. Note that ncol= number of y values and will be the vertical dimension. 
... 
Other possible arguments (not used) 
An list in image format. Components x and y are the grid values , z is a nrow X ncol matrix with the Z values. NA's are placed at cell locations where Z data has not been supplied.
image.smooth, image.plot, Krig.discretize, Krig.replicates
look< image.count( RMprecip$x, nrow=32, ncol=32) image.plot( look)