We follow the full chain of standard lifetable column calculations to translate mx to ex, then select the first element of ex. If min(age) > 0, then we return remaining life expectancy at the lowest given age.
mx_to_e0(mx, age, sex = "t", nx = rep(1, length(age)), closeout = TRUE)numeric scalar of e0
numeric vector of the mortality rates (central death rates)
integer vector of the lower bound of each age group (currently only single ages supported)
character: Male ("m"), Female ("f"), or Total ("t")
age interval width, assumes 1 by default
logical. Default TRUE.