Skip to content

Commit

Permalink
Merge pull request #19 from vimc/vimc-6488
Browse files Browse the repository at this point in the history
vimc-6488: Split stoner stochastic process into units
  • Loading branch information
weshinsley committed Jun 22, 2022
2 parents ff339a5 + b414883 commit 37ae630
Show file tree
Hide file tree
Showing 8 changed files with 533 additions and 456 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: stoner
Title: Support for Building VIMC Montagu Touchstones, using Dettl
Version: 0.1.5
Version: 0.1.6
Authors@R:
c(person("Wes", "Hinsley",role = c("aut", "cre", "cst", "dnc", "elg", "itr", "sng"),
email = "w.hinsley@imperial.ac.uk"),
Expand All @@ -19,6 +19,8 @@ Imports:
RPostgres,
utils,
data.table,
dplyr,
magrittr,
readr,
withr,
jsonlite
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ export(stoner_calculate_dalys)
export(stoner_dalys_for_db)
import(data.table)
import(readr)
importFrom(magrittr,"%>%")
importFrom(utils,read.csv)
importFrom(utils,write.csv)
6 changes: 3 additions & 3 deletions R/dalys.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ test_args <- function(con, dalys_params, life_table) {
c("average_duration", "disability_weight","outcome", "proportion"),
paste("dalys_params needs columns outcome, proportion,",
"average_duration and disablility_weight"))


if (!is.null(life_table)) {
if (class(life_table) != "data.frame") {
if (!is.data.frame(life_table)) {
stop("life_table (if specified) must be data.frame")
}
assert_set_equal(names(life_table), c("code", "value"),
assert_set_equal(names(life_table), c(".code", "value"),
"life_table (if specified) must have columns .code and value")
}
}
Expand Down
Loading

0 comments on commit 37ae630

Please sign in to comment.