I have a data frame with roughly 6000 columns and 5500 rows. The first column of my data frame is a Date ("Timeframe"), the rest of the columns are log returns for different stocks. I know want to write all of the stock columns (their names are their respective RICs) into one single column. The first column (Timeframe) shall however remain with the respective log returns.
Here is some trial data:
Timeframe <- c(2001-01-01, 2001-01-02, 2001-01-03)
ABC.PK <- c(0,000987, 0,987389, 0,09784372842)
FDE.OQ <- c(43827, 849320, 748932)
HIK.O <- c(5438, 92889, 7492)
DF <- data.frame(Timeframe, ABC.PK, FDE.OQ, HIK.O)
To better illustrate it, this is my current data frame:
And this is my desired output:
Who can help me?