Skip to content

Commit

Permalink
Assign final value to return the right copy
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed Sep 13, 2023
1 parent cfa9a65 commit 1ccfe38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/likelihood.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ likelihood <- function(chains, statistic = c("size", "length"), offspring_dist,
## multiply the likelihoods
if (isFALSE(individual)) {
summarise_func <- ifelse(log, sum, prod)
vapply(chains_likelihood, summarise_func, 0)
chains_likelihood <- vapply(chains_likelihood, summarise_func, 0)
}

return(chains_likelihood)
Expand Down

0 comments on commit 1ccfe38

Please sign in to comment.