I'm using R and have a dataframe with columns:
user_id brand_id gender ...
I want to create a new dataframe with each user_id appearing only once and with colums:
#brand1-#occurences #brand2-#occurrences ... male female ...
So I then could use the normal clustering methods.
Does anyone know how to do this?