Prediction and Poisson

I have been set the tast of running a Poisson regression and then using the predict command to predict the number of visits to the doctors per age group (<30, 30-50, >50) Whilst keeping illness and sex at their constant mean values.

Now my gender variable is:
> levels(DoctorVisits$gender)
[1] "male" "female"

This is what I have in place so far.... <- factor(c('Below.30', '30-50', 'Above.50'))
avg.illness <- mean(DoctorVisits$illness)
sex <-

hypothetical.person <- expand.grid(,
gender= sex,
newdata = hypothetical.person,
type = 'response')

As you can see I have not put anything for 'sex' as I am unsure of what is meant by keeping this variable at a constant mean value for something catergorical?
Thanks for any help.