Skip to content

Commit

Permalink
make logical operator scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Jan 22, 2024
1 parent c22a7ab commit 4d186fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/create.R
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ create_stan_data <- function(reported_cases, seeding_time,
is.na(data$prior_infections) || is.null(data$prior_infections),
0, data$prior_infections
)
if (data$seeding_time > 1 & nrow(first_week) > 1) {
if (data$seeding_time > 1 && nrow(first_week) > 1) {
safe_lm <- purrr::safely(stats::lm)
data$prior_growth <- safe_lm(log(confirm) ~ t, data = first_week)[[1]]
data$prior_growth <- ifelse(is.null(data$prior_growth), 0,
Expand Down

0 comments on commit 4d186fc

Please sign in to comment.