1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 05:22:48 +02:00

revert back to pre-antibiogram

This commit is contained in:
2023-02-09 13:07:39 +01:00
parent aa48c6bf53
commit 1a0dc4bf46
53 changed files with 984 additions and 1996 deletions

View File

@ -125,7 +125,7 @@ resistance_predict <- function(x,
meet_criteria(year_min, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
meet_criteria(year_max, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
meet_criteria(year_every, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
meet_criteria(model, allow_class = c("character", "function"), has_length = 1, allow_NULL = TRUE)
meet_criteria(I_as_S, allow_class = "logical", has_length = 1)
meet_criteria(preserve_measurements, allow_class = "logical", has_length = 1)
@ -260,8 +260,8 @@ resistance_predict <- function(x,
observed = df$R / (df$R + df$S),
stringsAsFactors = FALSE
)
df_prediction <- df_prediction %>%
left_join(df_observations, by = "year")
df_prediction <- df_prediction %pm>%
pm_left_join(df_observations, by = "year")
df_prediction$estimated <- df_prediction$value
if (preserve_measurements == TRUE) {