Thanks for this data New York Times, the thread title is my question, the example I present you with would look something like:
df %>% mutate(Orig_cases = ifelse(row_number()==1, sumCase, sumCase - lag(sumCase)))
date cases cumCase Orig_cases
1 2020-01-01 88 88 88
2 2020-01-02 49 137 49
3 2020-01-03 14 151 14
@Montana Yes, I'm not an R expert, but if that is subtracting the count on the previous day from the current day, that should give you the number of new new daily cases. Please read the README carefully, particularly the section on declining counts to understand the possible complications in interpereting the data that way.
Thank you both! I really appreciate it @cj2001 and @albertsun! Definitely would not laugh at you @cj2001 that's very cool.
@albertsun, thank you will reread about he declining counts to get a clarification and see what obstacles I might run into.