R subtracting 1 month from today's date gives NA
问题 I have a script in which I subset my data according to some set time periods and wanted to subset all the records that had occurred in the last month. However if I try to subtract one month from today's date it yields an NA: > today <- Sys.Date() > today [1] "2017-03-29" > today - months(1) [1] NA I do have lubridate loaded but I think this calculation is being performed with base R. If I subtract 2 or more months it works fine: > today - months(2) [1] "2017-01-29" > today - months(3) [1]