0

I am new to Tidyverse:

I've a data that shows like this:

Group   Run.Month2  Final.PV    Call    Draft.PV
A   30-04-2022  11922   0   7922
A   31-05-2022  11922   1   3922
A   30-06-2022  11922   1   -78
B   30-04-2022  14901   0   9901
B   31-05-2022  14901   1   4901
B   30-06-2022  14901   1   -99
C   30-04-2022  19670   0   13070
C   31-05-2022  19670   1   6470
C   30-06-2022  19670   1   -130
D   30-04-2022  44704   0   29704
D   31-05-2022  44704   1   14704
D   30-06-2022  44704   1   -296
E   30-04-2022  11922   0   7922
E   31-05-2022  11922   1   3922
E   30-06-2022  11922   1   -78
F   30-04-2022  16392   0   10892
F   31-05-2022  16392   1   5392
F   30-06-2022  16392   1   -108

Actual Data

Intended Ouput:

enter image description here

Formula in Intrest Column is :

For every start Runmonth by Group it is 0. Second Month is "Draft PV of Second Month" + "Interest of 1st Month" to be plotted. Similarly 3rd Month = "Draft PV of 3rd Month" + "Interest of 1st + 2nd Months" to be plotted.

I am finding it easy in excel using Freeze panes by tidyverse would be helpful.

Any help with R-Tidyiverse would be of great help. Thank you

Allan Cameron
  • 147,086
  • 7
  • 49
  • 87
  • Can you show the calculation how you get interest amounts? say for Group A : 312 is not the result of DraftPV (3922)+ Intt of 1st(0) ? Without getting your logic clear it would not be possible to work a solution. Hope you get that. and help u to help you. Cheers! – anuanand Mar 26 '22 at 09:15
  • Please, share your data in a machine readable format and the code you performed till now and didn' t work. – Scipione Sarlo Mar 26 '22 at 09:22
  • Please do not post photos of data or code! If you do, people who are willing to help you would have to type out all that text. Instead provide a [minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610) P.S. Here is [a good overview on how to ask a good question](https://stackoverflow.com/help/how-to-ask) – dario Mar 26 '22 at 11:06

0 Answers0