I am new at using R and I am trying to produce a histogram where the axis shows a sum of another column rather than just a frequency count.
example
I have a matrix with two columns, RATE and BALANCE. I would like to produce a histogram that shows the sum of balance rather than just record count.
hist(mydata$RATE)
#only shows frequency. How do i get it to sum mydata$BALANCE
I would like to produce a histogram that sums the BALANCE column rather than just doing a record count. something like hist(mydata$RATE, mydata$BALANCE)
but obviously the hist function doesn't appear to take a sum parameter