Skip to content

Commit

Permalink
Supress warnings for checking closed limits for default support method
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Sep 17, 2024
1 parent 3120cee commit 269119d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/default.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ support.dist_default <- function(x, ...) {
c(FALSE, FALSE)
} else {
# Default to open limits on error
lim_dens <- tryCatch(density(x, lims), error = function(e) c(0,0))
lim_dens <- tryCatch(
suppressWarnings(density(x, lims)),
error = function(e) c(0,0)
)
!near(lim_dens, 0)
}
new_support_region(
Expand Down

0 comments on commit 269119d

Please sign in to comment.