# Edpsy 589 # fall 2021 # c.j.anderson # # Covid-19 Data from News Gazette (online) May 15, 2021 # for Champaign County # # library(vcd) library(vcdExtra) df <- matrix(c( 1, 1383, 0, 2, 4248, 0, 3, 6113, 1, 4, 2572, 3, 5, 2147, 7, 6, 1767, 7, 7, 1346, 20, 8, 589, 35, 9, 315, 45, 10, 153, 27, 11, 8, 2), nrow=11, ncol=3, byrow=TRUE) ages.midpts <- c(5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105) ages.range <- c("10&under","11-20","21-30","31-40", "41-50", "51-60", "61-70", "71-80", "81-90","91-100", ">100") covid <- as.data.frame(cbind(df, ages.midpts, ages.range)) names(covid) <- c("x","cases", "deaths", "age.midpoint", "age.range") covid$x <- as.numeric(covid$x) covid$cases <- as.integer(covid$cases) covid$deaths <- as.integer(covid$deaths) covid$age.midpoint <- as.numeric(covid$age.midpoint) covid$pdeath <- covid$deaths/covid$cases