I have a data frame comprising a plurality of data points (x,y,z), (x,y)- lower right cell longitude latitude coordinate size w(e.g., mesh with one degree). The value zwas averaged over this cell.
I would like to plot these points in R so that the entire grid cell is filled with some color derived from z.
The result will look something like this:

The projection itself (for example, Lambert's conformal conic conformation, equiangular) does not matter, only the structure of the grid.
My data is sparse: not every cell of longitude and latitude will have data associated with it.
My hope would be a solution similar
library(maps)
map("state")
grid_points(my_data,c("x","y","z"),0.5)
where 0.5 is the resolution of the grid above, indicating a cell with 0.5 degrees.
Any thoughts?
Thank!