Skip to content

Commit

Permalink
Merge pull request #100 from dark-peak-analytics/RS_CRAN
Browse files Browse the repository at this point in the history
Rs cran
  • Loading branch information
RobertASmith committed Aug 30, 2024
2 parents 1417ef8 + e3a3df7 commit c8e0a67
Show file tree
Hide file tree
Showing 16 changed files with 104 additions and 426 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^cran-comments\.md$
20 changes: 14 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
Package: assertHE
Title: An R package designed to aid in verification of health economic decision models
Version: 0.0.0.9000
Title: Visualisation and Verification of Health Economic Decision Models
Version: 1.0.0
Authors@R: c(
person("Robert", "Smith", , "rsmith@darkpeakanalytics.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-0245-3217"))
person("Robert", "Smith", , "rsmith@darkpeakanalytics.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-0245-3217")),
person("Wael", "Mohammed", , "wmohammed@darkpeakanalytics.com", role = c("aut"),
comment = c(ORCID = "0000-0003-0370-4903")),
person("Jack", "Smith", , "", role = c("aut")),
person("Dark Peak Analytics Ltd", role = c("cph", "fnd"))
)
Description: An R package designed to help health economic modellers when writing unit tests for their models. The asserts contained in this package include black-box and white-box tests for common errors in health economic models. They are not designed to be exhaustive, but rather to provide a starting point with a set of 'standard' tests to free up modellers to focus on tests specific to the individual model in development or review.
Description: An R package designed to help health economic modellers when building and reviewing models.
The visualisation functions allow users to more easily review the network of functions
in a project, and get lay summaries of them. The asserts included are intended to check for common errors,
thereby freeing up time for modellers to focus on tests specific to the individual model in development or review.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down Expand Up @@ -41,4 +48,5 @@ Imports:
waiter,
igraph,
httr
URL: https://dark-peak-analytics.github.io/assertHE/
URL: https://dark-peak-analytics.github.io/assertHE/, https://github.com/dark-peak-analytics/assertHE
BugReports: https://github.com/dark-peak-analytics/assertHE/issues
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# assertHE (development version)

* Initial CRAN submission.
* Added a `NEWS.md` file to track changes to the package.
33 changes: 16 additions & 17 deletions R/check_PSAstability.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,32 @@
#' @importFrom tidyr pivot_longer
#'
#' @examples
#'
#' \dontrun{
#' # create example matrices
#' m_eff <- as.matrix(gskVEOutils::Hyperphosphatemia_PSA$e)[,1:5]
#' colnames(m_eff) <- LETTERS[1:length(colnames(m_eff))]
#' n_psa <- 10000
#'
#' m_cost <- as.matrix(gskVEOutils::Hyperphosphatemia_PSA$c)[,1:5]
#' colnames(m_cost) <- LETTERS[1:length(colnames(m_cost))]
#' m_eff <- matrix(data = runif(n = n_psa * 4, min = 0, max = 1),
#' nrow = n_psa,
#' ncol = 4,
#' dimnames = list(NULL, paste0("Strategy ", c("A", "B", "C", "D"))))
#'
#' v_strategy_labels <- setNames(object = paste0("Strategy ", colnames(m_eff)),
#' nm = colnames(m_eff))
#' m_cost <- matrix(data = runif(n = n_psa * 4, min = 5000, max = 20000),
#' nrow = n_psa,
#' ncol = 4,
#' dimnames = list(NULL, paste0("Strategy ", c("A", "B", "C", "D"))))
#'
#' v_strategy_colors <- setNames(object = grDevices::palette.colors(n = ncol(m_eff)),
#' nm = colnames(m_eff))
#'
#' plot_PSA_stability(m_eff = m_eff[, 1:5],
#' m_cost = m_cost[, 1:5],
#' plot_PSA_stability(m_eff = m_eff,
#' m_cost = m_cost,
#' lambda = 20000,
#' currency_symbol = "\u0024",
#' v_strategy_labels = v_strategy_labels,
#' v_strategy_labels = colnames(m_eff),
#' v_strategy_colors = v_strategy_colors,
#' comparator = colnames(m_eff)[1],
#' output = "icer",
#' include_reference_line = T,
#' log_x = F)
#'
#' } # end don't run.
#' output = "inmb",
#' include_reference_line = TRUE,
#' log_x = FALSE)
#'
plot_PSA_stability <- function(m_eff,
m_cost,
Expand All @@ -59,7 +58,7 @@ plot_PSA_stability <- function(m_eff,
comparator = NULL,
output = "inmb",
include_reference_line = T,
log_x = F) {
log_x = FALSE) {
assertthat::assert_that(is.matrix(m_eff) &
is.matrix(m_cost) & is.numeric(m_eff) & is.numeric(m_cost),
msg = "m_eff and m_cost must be numeric matrices")
Expand Down
Loading

0 comments on commit c8e0a67

Please sign in to comment.