Skip to content

Commit

Permalink
fix: check for MASS
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanppetkov committed Mar 3, 2025
1 parent d8db832 commit 24afa97
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/density_scatter_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,7 @@ DensityScatterPlot <- function(
#' @noRd
#'
.get2Ddensity <- function(x, y, n = 500, ...) {
if (!requireNamespace("MASS", quietly = TRUE)) {
cli::cli_abort("Package {.pkg MASS} must be installed to use this function")
}
expect_MASS()

dens_grid <- MASS::kde2d(x, y, n = n, ...)
x_idx <- findInterval(x, dens_grid$x)
Expand Down

0 comments on commit 24afa97

Please sign in to comment.