This question is a follow-up to Count days per year.
I did what Dirk suggested with a huge data.frame. My commands look like this:
dateSeq <- function(df) {
res <- seq(as.Date(df["begin"]), as.Date(df["end"]), by = "1 day")
format(res, "%Y")
}
dataFrame$seq <- apply(dataFrame, 1, dateSeq)
dataFrame_years <- do.call("c", dataFrame[["seq"]])
rm(dataFrame)
gc()
gc()
dataFrame_tab <- table(dataFrame_years)
Now, these commands fill up my 8 GB Ram and 2 GB swap space. In the mean time my processor is bored having a processor load of maybe 15 %.
Besides, it takes ages for my computer to fulfill my "desires". Can I shift some of the work to the CPU and unburden my Ram a bit?