I am trying to consolidate duplicate rows in my dataframe and count the other rows that correspond to duplicates.
This thread was very helpful but when I tried with count instead of sum as the function in the ddply approach I got error: length(rows)==1 is not TRUE.
ACCT_NUM DC_NUM INVOICE_NUM DATE DC_PROD_ NUM DELIVERED_QUANTITY
640324 CCF575-000712116 15283 4-May-15 154609 1 29147104
640324 CCF575-000712116 15283 4-May-15 423580 1 29147104
640324 CCF575-000712116 15283 4-May-15 538010 1 29147104
640324 CCF575-000712116 15283 4-May-15 991900 1 29147104
640324 CCF575-000712116 15283 4-May-15 991940 1 29147104
640324 CCF575-000712116 15283 4-May-15 991960 1 29147104
640324 CCF575-000712116 29289 7-May-15 423580 1 29181744