Skip to content

Commit

Permalink
Merge pull request #99 from JuliaActuary/life_exp_fix
Browse files Browse the repository at this point in the history
Life exp fix
  • Loading branch information
alecloudenback authored Apr 27, 2021
2 parents 2666c21 + 3b7b1a8 commit ab4544b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MortalityTables"
uuid = "4780e19d-04b9-53dc-86c2-9e9aa59b5a12"
authors = ["Alec Loudenback <[email protected]>"]
version = "2.1.0"
version = "2.1.1"

[deps]
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Expand Down
2 changes: 1 addition & 1 deletion src/life_expectancy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Calcuate the remaining life expectancy. Assumes curtate life expectancy for tables if not Parametric or DeathDistribution given.
"""
function life_expectancy(table,age)
sum(survival(table,age,age + dur) for dur in 1:length(table) -age)
sum(survival(table,age,age + dur) for dur in 1:lastindex(table) -age)
end

function life_expectancy(table,age,dist)
Expand Down

2 comments on commit ab4544b

@alecloudenback
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/35409

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.1.1 -m "<description of version>" ab4544b5104fec0b3967c794f384605710d97b75
git push origin v2.1.1

Please sign in to comment.