data(m.apca0103)
dim(m.apca0103)
# 1440 3; 1440 = 40*36
# Are the dates all the same?
sameDates <- rep(NA, 39)
for(i in 1:39)
sameDates[i] <- with(m.apca0103,
all.equal(date[1:36], date[(i*36)+1:36]))
stopifnot(all(sameDates))
M.apca0103 <- with(m.apca0103, array(return, dim = c(36, 40), dimnames =
list(NULL, paste("Co", CompanyID[seq(1, 1440, 36)], sep=""))))
Run the code above in your browser using DataLab