Doing an assignment for school in which we use a pre-loaded dataframe (Midwest) from dplyr to manipulate data and display visualizations through shiny.
I'm getting the error "Problem with 'summarise()' input 'Illinois' because "object 'IL' not found (even though that's a variable in a column that I thought I had grouped by.
Here's some of my code at the moment.
bar_chart <- function(midwest) {
data_summary <- midwest %>%
dplyr::group_by(state) %>%
summarize("Illinois" = mean(IL, na.rm = TRUE),
"Minnesota" = mean(MN, na.rm = TRUE),
"Indiana" = mean(IN, na.rm = TRUE),
"Ohio" = mean(OH, na.rm = TRUE),
"Wisconsin" = mean(WN, na.rm = TRUE))