# NOT RUN {
data(e0Mproj, package = "wpp2017")
country <- "Brazil"
# get target e0
e0m <- as.numeric(subset(e0Mproj, name == country)[-(1:2)])
# project into future
pred <- logquad(e0m, sex = "male")
# plot first projection in black and the remaining ones in heat colors
plot(pred$mx[,1], type = "l", log = "y", ylim = range(pred$mx),
ylab = "male mx", xlab = "Age", main = country)
for(i in 2:ncol(pred$mx)) lines(pred$mx[,i],
col = heat.colors(20)[i])
# }
Run the code above in your browser using DataLab