How collect additional row data on binned data in R
问题 I want sort the values of one data.frame column into predetermined bins, and then sum values that are in the same rows, but a different column.What I'm trying to do is sort dataframe column items into bins based on one value and then get a sum of a second value attached to the items for all of the items in the bin. Can someone help me? My data looks like this df = Item valueX valueY A 169849631 0.9086560 B 27612064 0.9298379 C 196651878 1.6516654 D 33007984 1.3397873 E 23019448 -0.2954385 F