hmd.mx reads "Mx" (1x1) data from the Human Mortality Database (HMD plot.demogdata and fitting an LC or BMS model using lca or an
FDA model using fdm.
hmd.pop reads "Population" (1x1) data from the HMD and constructs a demogdata object suitable for plotting using plot.demogdata.
hmd.e0 reads life expectancy at birth from the HMD and returns the result as a ts object.hmd.mx(country, username, password, label = country)
hmd.mx(country, username, password, label = country)
hmd.e0(country, username, password)hmd.mx returns an object of class demogdata with the following components:rate but containing population numbers instead of demographic rates.hmd.pop returns a similar object but without the rate component.
hmd.e0 returns an object of class ts with columns male, female and total.demogdata,read.demogdata,plot.demogdata, life.expectancynorway <- hmd.mx("NOR", username, password, "Norway")
summary(norway)Run the code above in your browser using DataLab