Dataframe (not the same length)

I'm trying to create a dataframe for 5 different stock market indexes that are not the same length. Is there an alternative to dataframe to group all these data?

startDate = as.Date("2000-01-01")
endDate = as.Date("2021-10-30")

getSymbols("^GSPC", from = startDate, to = endDate)
getSymbols("^GDAXI", from = startDate, to = endDate)
getSymbols("^FCHI", from = startDate, to = endDate)
getSymbols("^FTSE", from = startDate, to = endDate)
getSymbols("^N225", from = startDate, to = endDate)

rGSPC <- dailyReturn(GSPC)
rGDAXI <- dailyReturn(GDAXI)
rFCHI <- dailyReturn(FCHI)
rFTSE <- dailyReturn(FTSE)
rN225 <- dailyReturn(N225)
rX <- data.frame(rGSPC, rGDAXI, rFCHI, rFTSE, rN225)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.