## Not run:
# ##########################
# # This example only makes sense if there is a simulation
# # for all countries. Below, only two countries are included,
# # so the map is useless.
# ##########################
# sim.dir <- file.path(find.package("bayesPop"), "ex-data", "Pop")
# pred <- get.pop.prediction(sim.dir=sim.dir, write.to.cache=FALSE)
# # Uses heat colors with seven categories by default
# pop.map(pred, sex='female', age=4:10)
# # Female population in child-bearing age as a proportion of totals
# pop.map(pred, expression='PXXX_F[4:10] / PXXX')
# # The same with more colors
# params <- get.pop.map.parameters(pred, expression='PXXX_F[4:10] / PXXX')
# do.call('pop.map', params)
# # Another projection year on the same color scale
# do.call('pop.map', c(list(year=2043), params))
# # Potential support ratio using googleVis
# pop.map.gvis(pred, expression="PXXX[5:13] / PXXX[14:27]")## End(Not run)
Run the code above in your browser using DataLab