Skip to content

Commit

Permalink
Avoid nsample error
Browse files Browse the repository at this point in the history
alanocallaghan committed Mar 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 14bc635 commit aad1904
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/Methods.R
Original file line number Diff line number Diff line change
@@ -159,6 +159,10 @@ setMethod("Summary",
HPD[, 2:3] <- apply(n, 2, function(col) {
if (na.rm) {
col <- na.omit(col)
# avoid coda error for no samples
if (length(col) < 2) {
return(NA)
}
}
coda::HPDinterval(coda::mcmc(col), prob = prob)
})

2 comments on commit aad1904

@alanocallaghan
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @catavallejos can you push this branch (RELEASE_3_18) to bioc? BASiCS is currently broken, this should fix it (as with #281, but now with na.rm actually working)

@catavallejos
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!! I saw the email but I've been busy today. I will merge / push now

Please sign in to comment.