From a337626ce0fc23a493d872e1e412ff9c89095541 Mon Sep 17 00:00:00 2001 From: Pratik Gupte Date: Thu, 8 Feb 2024 15:45:44 +0000 Subject: [PATCH] Useq seq() for numeric sequence Use seq_len() for 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..431ebeb9 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_len(n_bin)]) density_prob <- utils::head(one_sub_cumulative_probs, -1) -