Q4.1$location[Q4.1$firstthree %in% c(601, 787, 334, 853,847,287,981,846,984,498,618,341,337,973, 972,830,977,339,432,902,982,342,560,926,809,357,875,565,297,808,554,770,852,553,024,029,045)] <- "Not in Wisconsin"
Notice that this code works except when my zipcodes start from number 0. 024,029,045 returns 3 missing values. I don't know why.