monthly difference

I have monthly data (2009-2022). I want to find out the difference between months of a year from last yea month (e.g. Jan2022-Jan2021, Jan2021-Jan2020, and so on). How can I find out???


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

If you have clean monthly data, the dplyr window function diff with mutate is a handy way to calculate monthly change in variables. With a reprex we could give you an example.

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.