I am trying to get this to work with a simple method.
Let's say there is a table for Cars Sold and with the name Car Model and Price Car was sold for
Eg.
CarName Price AcuraLegend 30000 AcuraTSX 40000 HondaCivic 20000 HondaCivic 22000 HondaCivic 22000 ToyotaCamry 18000
and then another 2900 entries
I need to find the maximum price that each car sold, and the number of cars sold for the maximum amount. Thus, if we used the aforementioned framework, considering that the maximum price paid for HondaCivic in the entire data frame was 22,000, and only 2 cars were sold at this price, for HondaCivic I would have
CarName MaxPricePaidForCar NumberofCarsSoldforMaxPrice HondaCivic 22000 2
Now I managed to put this together with a rather tedious way of using tapply and merging, etc. etc.
Any suggestions on a simpler method would be very helpful,
source share