I am beginning programming in R and I have not found the solution to this problem.
I have data saved in a dataframe as displayed below :
Material created_date
1 50890000 29/10/2018
2 50890000 17/10/2018
3 50890000 31/05/2018
4 50890000 08/02/2018
5 50890000 09/01/2018
6 50900000 21/12/2018
7 50900000 27/09/2018
8 50900000 24/08/2018
9 50900000 18/05/2018
10 51200000 13/07/2018
11 51210001 08/08/2018
12 51210001 26/07/2018
13 51210001 27/02/2018
14 51210001 17/01/2018
15 51210001 09/01/2018
16 51210002 29/08/2018
17 51210002 08/08/2018
18 51210002 13/04/2018
I would like to calculate 4 columns :
- Average difference between consecutive dates in days
- Standard deviation associated
- Average difference between consecutive dates in working days
- Standard deviation associated
I have been told to used plyr
or dplyr
but as I am beginning I am not sure how to compute the desired output.
Thank you,