Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed May 29, 2024
1 parent 02f782f commit e239252
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/likelihood.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ likelihood <- function(chains, statistic = c("size", "length"), offspring_dist,
checkmate::assert_numeric(
exclude, null.ok = TRUE
)
# likelihood cannot work with an <epichains> object so convert to
# <epichains_summary>
# likelihood is designed to work with numeric objects to <epichains> objects
# need to be coerced to <epichains_summary> objects (numeric vector under
# the hood) for the likelihood calculation
if (.is_epichains(chains)) {
chains <- summary(chains)
}
Expand Down

0 comments on commit e239252

Please sign in to comment.