sorting - Keeping multiple orders in data.table in R -
i have transaction
table 50m rows, few sample fields follow:
buyer_id month day hour location seller_id
i need repeatedly sort table find popular sellers, locations, month etc. per buyer , create new summary
table.
i need merge summary
table transaction
table find out sellers popular in top frequent locations etc.
each time, i'll have re-sort transaction table
according several sets of columns. might end sorting setorder(transaction, user_id, month, location)
several times.
i know data.table create order reference (kinda keep in hidden column), without copying table.
is there way store , refer these "hidden columns" explicitly, don't have resort data many times in same way?
Comments
Post a Comment