# NOT RUN {
testarray <- array(NA, dim = c(20, 16, 9)) # Create empty array
# with correct third dimension
windowfill <- seq(10, 100, 10) # Create dummy simulation data
# (ages) to copy through the array
for(i in 6:length(testarray[1, , 1])){
testarray[, i, 3] <- c(windowfill,
rep(NA, length(testarray[, 1, 3]) - length(windowfill)))
windowfill <- c(NA, windowfill + 31)
}
testarray2 <- age_corr(testarray, 365, FALSE, FALSE) # Apply function on
array
# }
Run the code above in your browser using DataLab