I have a table calculated using a df which looks like the following.
Month_considered pct `ATC Count`
<fct> <dbl> <fct>
1 Apr-17 54.9 198,337
2 May-17 56.4 227,681
3 Jun-17 58.0 251,664
4 Jul-17 57.7 251,934
5 Aug-17 55.5 259,617
6 Sep-17 55.7 245,588
7 Oct-17 56.6 247,051
8 Nov-17 57.6 256,375
9 Dec-17 56.9 277,784
10 Jan-18 56.7 272,818
Now I want to find the difference in pct between two months.So the desired output would be like
Month_considered pct
<fct> <dbl>
1 Apr-17-May-17 1.5
2 May-17-Jun-17 1.6
3 Jun-17-Jul-17 - 0.3
How do I concatenate the first column like above. I did try using unite
in tidyr
but it isnt the output what I want to generate.Thank you.