Question: Please use R to write, Take the county-level data and add up the total case number in each state on each day (e.g., aggregate to
Please use R to write,
Take the county-level data and add up the total case number in each state on each day (e.g., aggregate to the state level). Store this in a data frame called `county_to_state_total_cases_df` with 3 columns:`date`, `state`, `county_total`
To avoid dplyr keeping the results "grouped" in your output, pass an additional argument to your summarize() call telling it not to keep the groups:.groups = "drop"
The county-level data frame: county_df
Columns: date, county_state, county, state, fips, cases, deaths
The state-level data frame: state_df
Columns: date, state, fips, cases, deaths, ratio_deaths
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
