tidymodels / spatialsample

Create and summarize spatial resampling objects 🗺
https://spatialsample.tidymodels.org
Other
71 stars 5 forks source link

Special-case NULL, Inf (Fixes #89) #90

Closed mikemahoney218 closed 2 years ago

mikemahoney218 commented 2 years ago

This PR fixes #89 by special-casing v = NULL and Inf so that they set v <- max_v without a warning. It also updates the documentation for v everywhere except spatial_clustering_cv(), which sets allow_max_v to FALSE and so cannot take advantage of these special cases.

While editing, I also changed is.numeric to rlang::is_integerish, since the error message already indicates v needs to be an integer and I think non-integer v is handled inconsistently in the resampling methods.

github-actions[bot] commented 2 years ago

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.