How can i create arithmatic new variable depends upon another variable?

I want to make a graph, which shows incremental speed of cases starting from first cases happened. How can i do this? I think, if i create new arithmatic variable, which starts with 1 after the first case happen for each country, it will be okey? Any suggestion?


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:

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