Short and sweet here...
I have ZIP codes in the dataframe I am analyzing in R.
R is reading them as numeric variables. How can I have R read these ZIP codes (e.g., 20001) as a categorical variable.
(Just making my comment an answer)
You can use
data$ZIP <- as.character(data$ZIP)
or
data$ZIP <- as.factor(data$ZIP)
depending on the variable type you prefer to work with.