Contour mapping/ response surface plotting with categorical variables

Dear all,

I am trying to make a contour plot in R with two categorical variables and a response variable. I can see a lot of examples with the numeric dataset, but I am having trouble making a contour plot/response surface curve. Any help will be highly appreciated.
Thank you.