I have a SPSS dataset with 3 columns ("companies", "date", "return") like this:
Now I would like to transform it so that only dates show up in a row and each company return for a given date is in a separate column, like this:
Is there an easy way to do that in either SPSS or R?
Thanks for the help!
dputinstead to make reproducible example(s). Give this link a read. Thanks - Sotosdcastfromreshape2- akrundcast(df1, date~companies, value.var= "return")- akrun