I have two columns: one is a numerical variable and the other is a categorical variable. How do I make it so that I have n columns for the n categories of my categorical variable and in each column is the numerical observations that belong in that category. Please help, I have tried looking it up but I cant find a function that will do the trick.
Thank you!