I have used the following ggplot command:
ggplot
ggplot(survey, aes(x = age)) + stat_bin(aes(n = nrow(h3), y = ..count.. / n), binwidth = 10) + scale
This is working for me.
Define a factor:
hospitals.factor<- factor( c("H0","H1","H2") )
and use, in ggplot():
ggplot()
facet_grid( hospitals.factor[hospital] ~ . )