Skip to content

Commit

Permalink
ensure multi-row epireview entries have the same units in coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Oct 9, 2024
1 parent e634b71 commit 30e10f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/coercion.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ is_epiparameter_df <- function(x) {
summary_stats$sd <- sd_
}
metadata <- create_metadata()
metadata$units <- x$parameter_unit
metadata$units <- .unique(x$parameter_unit, var_name = "units")
metadata$sample_size <- .unique(x$population_sample_size)
metadata$inference_method <- inference_method
location <- .unique(x$population_location)
Expand Down Expand Up @@ -456,7 +456,7 @@ is_epiparameter_df <- function(x) {
x <- unique(x)
if (length(x) != 1) {
stop(
"epireview parameters contains multiple different", var_name, "\n",
"epireview parameters contains multiple different ", var_name, "\n",
"Cannot convert to <epiparameter>",
call. = FALSE
)
Expand Down

0 comments on commit 30e10f1

Please sign in to comment.