Why does "for" convert dates to numeric, and what is the best way to cycle through dates?
mnths <- c(as.Date("2016-02-01"),as.Date("2016-03-01")) str(mnths[1]) Date[1:1], format: "2016-02-01" for (m in mnths) { str(m) } num 16832 num 16861
source share