I have got a data.frame "Trades", which includes all trades of a year and a new table "Trades_no_duplicates", which has not duplicates based on each user (ExtId.User.ID). There I created a new column, called "Median_Risk“.
Now I would like to take from the "Trades" data frame all information from the column "Product_Risk" for each user, check what category appears the most (= median) and write this category in the column "Median_Risk" of each user (=ExtId.User.ID).
Could you help me solve this problem?
Thank you so much!