Find the difference between date vectors in months

lubridate
#1
  1. create a lag vector of a Date vector

  2. find the difference between original Date vector and its lag series created in the previous step.

  3. difference to be in months

0 Likes

#2

Welcome to the community!

Without any more details, it's hard to give you a solution. I think the following SO answer will be very helpful. You can look at the other answers on that thread too.

In case it doesn't solve your problem, please provide more details, preferably in form of a REPRoducible EXample](FAQ: What's a reproducible example (`reprex`) and how do I do one?).

In case you don't know how to make a reprex, here's a great link:

0 Likes

closed #3

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes