This is on R. I am working on looking at the rate of food insecurity in specific counties of a state. I was given data from all 50 states, and am trying to filter out all counties except the specific 14 I need. The code is not working and I am confused where I am going wrong. The code I used is this:
county_map <- MMG_2019_20_Network_2022_07_08 %>%
group_by(State) %>%
filter(State=="GA", `County, State`==c("Barrow County, Georgia",
"Clarke County, Georgia", "Franklin County, Georgia", "Habersham County, Georgia",
"Hart County, Georgia", "Jackson County, Georgia", "Madison County, Georgia",
"Oconee County, Georgia", "Oglethorpe County, Georgia", "Rabun County, Georgia",
"Stephens County, Georgia", "Towns County, Georgia", "White County, Georgia"))
This gives the error message
"Error in `filter()`:
! Problem while computing `..2 = `County, State` == ...`.
✖ Input `..2` must be of size 2 or 1, not size 13.'
So I understand that it's because the vector is too big, but I don't understand how to fix that. I am new to coding and don't know where to go from here.