Skip to content

Commit

Permalink
Show top-level function in error message (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemahoney218 authored Nov 14, 2023
1 parent ff0291b commit 9877514
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions R/spatial_block_cv.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,13 @@ generate_folds_from_blocks <- function(data, centroids, grid_blocks, v, n, radiu
# forward
n_indices <- sum(vapply(indices, length, numeric(1)))
if (n_indices > nrow(data)) {
rlang::abort(c(
"Some observations fell exactly on block boundaries, meaning they were assigned to multiple assessment sets unexpectedly.",
i = "Try setting a different `expand_bbox` value, an `offset`, or use a different number of folds."
))
rlang::abort(
c(
"Some observations fell exactly on block boundaries, meaning they were assigned to multiple assessment sets unexpectedly.",
i = "Try setting a different `expand_bbox` value, an `offset`, or use a different number of folds."
),
call = rlang::caller_env(n = 3)
)
}

if (is.null(radius) && is.null(buffer)) {
Expand Down

0 comments on commit 9877514

Please sign in to comment.