Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: DrugUtilisation
Title: Summarise Patient-Level Drug Utilisation in Data Mapped to the OMOP
Common Data Model
Version: 1.0.3
Version: 1.0.4
Authors@R: c(
person(
"Martí", "Català", email = "marti.catalasabate@ndorms.ox.ac.uk",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# DrugUtilisation 1.0.4

* Fix plotDrugUtilisation combining different cdm_name by @catalamarti

# DrugUtilisation 1.0.3

* Skip some tests for regression in duckdb by @catalamarti
Expand Down
5 changes: 3 additions & 2 deletions R/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ plotDrugUtilisation <- function(result,
cli::cli_abort()
}
vars <- getVariables(result)
x <- vars[!vars %in% c(asCharacterFacet(facet), result)]
x <- vars[!vars %in% asCharacterFacet(facet)]
if (length(x) == 0) {
result <- result |>
omopgenerics::tidy() |>
Expand Down Expand Up @@ -288,7 +288,7 @@ plotDrugUtilisation <- function(result,
result <- result |>
dplyr::filter(.data$estimate_name %in% .env$est)
vars <- getVariables(result)
x <- vars[!vars %in% c(asCharacterFacet(facet), result)]
x <- vars[!vars %in% asCharacterFacet(facet)]
if (length(x) == 0) {
result <- result |>
omopgenerics::tidy() |>
Expand Down Expand Up @@ -535,6 +535,7 @@ getVariables <- function(res) {
dplyr::distinct() |>
omopgenerics::splitAll() |>
omopgenerics::addSettings() |>
dplyr::select(!"result_id") |>
as.list() |>
purrr::map(unique) |>
purrr::keep(\(x) length(x) > 1) |>
Expand Down