From 3a8b49259292c708cb56c107f6167ebc8b816857 Mon Sep 17 00:00:00 2001 From: pratikunterwegs Date: Thu, 8 Feb 2024 15:30:29 +0000 Subject: [PATCH] Useq seq() for numeric sequence --- R/model_ebola.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/model_ebola.R b/R/model_ebola.R index 130b1981..2efa1c55 100644 --- a/R/model_ebola.R +++ b/R/model_ebola.R @@ -27,7 +27,7 @@ prob_discrete_erlang <- function(shape, rate) { one_sub_cumulative_probs[n_bin] <- sum(total) cumulative_prob <- 1 - one_sub_cumulative_probs[n_bin] } - one_sub_cumulative_probs <- c(1, one_sub_cumulative_probs[1:n_bin]) + one_sub_cumulative_probs <- c(1, one_sub_cumulative_probs[seq(n_bin)]) density_prob <- utils::head(one_sub_cumulative_probs, -1) -