## Importing mortality data from the USA available on the Human Mortality Database (HMD):
data(USA)
# Example: -------------------------------
USA2010 = USA[USA$Year == 2010,]
ExF = USA2010$Ex.Female[1:91]
DxF = USA2010$Dx.Female[1:91]
x <- 0:90
fitF <- hp(x, ExF, DxF, model = "lognormal", M = 1000, bn = 0, thin = 10)
Heatmap(fitF, x_lab = "Female expec. 2010 USA")
Run the code above in your browser using DataLab