Skip to content

Commit d54edf9

Browse files
committed
version 2.1.2
- update web source for Australian Human Mortality Database;
1 parent 58e47aa commit d54edf9

File tree

7 files changed

+35
-33
lines changed

7 files changed

+35
-33
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: MortalityLaws
22
Type: Package
33
Title: Parametric Mortality Models, Life Tables and HMD
4-
Version: 2.1.1
4+
Version: 2.1.2
55
Authors@R: c(
66
person("Marius D.", "Pascariu", role = c("aut", "cre", "cph"), email = "mpascariu@outlook.com", comment = c(ORCID = "0000-0002-2568-6489")),
77
person("Vladimir", "Canudas-Romo", role = "ctb"))

NEWS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
version 2.1.2
2+
- update web source for Australian Human Mortality Database;
3+
14
version 2.1.1
2-
- privide anchors to all documented external \links{};
5+
- provide anchors to all documented external \links{};
36

47
version 2.1.0
58
- replace several stop errors with messages so the failure to connect to databases (for whatever reason) results in a gracefull ending of the process and to avoid triggering CRAN random error;

R/availableLaws.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# --------------------------------------------------- #
2-
# Author: Marius D. PASCARIU
3-
# Last update: Fri Feb 04 11:39:09 2022
4-
# --------------------------------------------------- #
1+
# ------------------------------------------------- #
2+
# Author: Marius D. Pascariu
3+
# Last update: Wed Apr 2 11:07:37 2025
4+
# ------------------------------------------------- #
5+
56

67
#' Check Available Mortality Laws
78
#'
@@ -47,10 +48,9 @@
4748
#' \item{Harper, F. S. (1936). An actuarial study of infant mortality.
4849
#' Scandinavian Actuarial Journal 1936 (3-4), 234-270.
4950
#' \doi{10.1080/03461238.1936.10405113}}
50-
#' \item{Weibull, W. (1951).
51-
#' \href{http://web.cecs.pdx.edu/~cgshirl/Documents/Weibull-ASME-Paper-1951.pdf}{
52-
#' A statistical distribution function of wide applicability.}
53-
#' Journal of applied mechanics 103, 293-297.}
51+
#' \item{Weibull, W. (1951). A statistical distribution function of wide applicability.
52+
#' Journal of applied mechanics 103, 293-297.
53+
#' \doi{10.1115/1.4010337}}
5454
#' \item{Beard, R. E. (1971).
5555
#' \href{http://longevity-science.org/Beard-1971.pdf}{
5656
#' Some aspects of theories of mortality, cause of

R/readAHMD.R

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
# -------------------------------------------------------------- #
2-
# Author: Marius D. PASCARIU
3-
# Last Update: Mon Jan 15 17:56:54 2024
4-
# -------------------------------------------------------------- #
1+
# ------------------------------------------------- #
2+
# Author: Marius D. Pascariu
3+
# Last update: Wed Apr 2 11:03:28 2025
4+
# ------------------------------------------------- #
55

66
#' Download the Australian Human Mortality Database (AHMD)
77
#'
88
#' Download detailed mortality and population data for different
99
#' provinces and territories in Australia, in a single object from the
10-
#' \href{https://demography.cass.anu.edu.au/research/australian-human-mortality-database}{
11-
#' Australian Human Mortality Database}.
10+
#' \href{https://aushd.org/}{Australian Human Mortality Database}.
1211
#'
1312
#' @details
1413
#' (Description taken from the AHMD website).
@@ -110,7 +109,7 @@ ReadAHMD <- function(what,
110109
interval = interval,
111110
username = NULL,
112111
password = NULL,
113-
link = "https://demography.cass.anu.edu.au/sites/default/ahmd/"))
112+
link = "https://aushd.org/assets/txtFiles/humanMortality/"))
114113
}
115114

116115
if(length(D) != 0) {
@@ -153,7 +152,7 @@ check_input_ReadAHMD <- function(x) {
153152
"Try one of these options:\n", paste(data_format(), collapse = ", "),
154153
call. = FALSE)
155154
}
156-
155+
157156
if (!(x$what %in% HMDindices())) {
158157
stop(x$what, " does not exist in AHMD. Try one of these options:\n",
159158
paste(HMDindices(), collapse = ", "), call. = FALSE)
@@ -177,7 +176,7 @@ check_input_ReadAHMD <- function(x) {
177176
print.ReadAHMD <- function(x, ...){
178177
what <- x$input$what
179178
cat("Australian Human Mortality Database\n")
180-
cat("Web Address : https://demography.cass.anu.edu.au/research/australian-human-mortality-database\n")
179+
cat("Web Address : https://aushd.org\n")
181180
cat("Download Date :", x$download.date, "\n")
182181
cat("Type of data :", what, "\n")
183182
cat(paste("Interval :", x$input$interval, "\n"))

man/ReadAHMD.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/availableLaws.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test_ReadAHMD.R

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# -------------------------------------------------------------- #
2-
# Author: Marius D. PASCARIU
3-
# Last Update: Mon Jan 15 16:57:56 2024
4-
# -------------------------------------------------------------- #
1+
# ------------------------------------------------- #
2+
# Author: Marius D. Pascariu
3+
# Last update: Wed Apr 2 11:42:35 2025
4+
# ------------------------------------------------- #
5+
56
remove(list = ls())
67

78
# Wrong index
89
expect_error(ReadAHMD(what = "DxDD"))
9-
# Wrong country
10+
11+
# Wrong region
1012
expect_error(ReadAHMD(what = "Dx",
1113
regions = "ACTT"))
1214

@@ -15,15 +17,15 @@ expect_error(ReadAHMD(what = "Dx",
1517
regions = "ACT",
1618
interval = "1x50"))
1719

18-
# Wrong country for the index
19-
expect_message(
20+
# Wrong region for the index
21+
expect_error(
2022
ReadAHMD(what = "LT_fc",
2123
regions = "TAS",
2224
interval = "1x1",
2325
show = FALSE))
2426

2527
# Wrong interval for the index
26-
expect_message(
28+
expect_error(
2729
ReadAHMD(what = "e0",
2830
regions = "TAS",
2931
interval = "5x1",

0 commit comments

Comments
 (0)