I'm afraid this is a slightly abstract question, but is there a way to use a metric other than 'count' in hexbin. My code to produce a hexbin chart would be something like:
library(hexbin)
hexbinplot(latitude~longitude,data=X)
Given that my output is essentially a map, I was wanting to replace 'count'and make the colours of the hexbins relate to a 3rd variable at the aggregate level, eg say I were looking at demographic data, then the 3rd variable might be aggregate or average consumer spending power of all those people belonging to a geographical region defined by the hexbin.
I understand that this would be possible by conditioning on a third variable in 2 windows in the normal lattice/trellis way, but I'm not sure it is possible to have a representation of something other than 'count' in the chart. Thanks for any help.