Try this:
h <- hist(logarea,breaks="FD")
product <- with(h,mids*counts)
In addition to plotting a histogram, hist(...)
returns a list of values. h$counts
is the frequency (number of observations) in each bin, and h$mid
is the midpoint value of the bin. So I think this is what you're looking for. See the documentation for more information.