I'm repeating a defunct question which did not get any answers at the time. Unlike the base::hist
function, lattice::histogram
doesn't identify where, if at all, the y-axis data (aka frequency counts) are stored in the returned object. I did find a function in one of the attributes (list element) of the returned object which seems to suggest that the y-data are recalculated on the fly for plotting but not stored.
$yscale.components
function (lim, packet.number = 0, packet.list = NULL, right = TRUE,
...)
{
comps <- calculateAxisComponents(lim, packet.list = packet.list,
packet.number = packet.number, ...)
list(num.limit = comps$num.limit, left = list(ticks = list(at = comps$at,
tck = 1), labels = list(at = comps$at, labels = comps$labels,
cex = 1, check.overlap = comps$check.overlap)), right = right)
}
<bytecode: 0x00000294e6762dc0>
<environment: namespace:lattice>
I did locate the input dataset, contained in $panel.args
.