tidymodels / spatialsample

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

Non-numeric `coords` give a bizarre error #80

Closed mikemahoney218 closed 2 years ago

mikemahoney218 commented 2 years ago

At least, I think that's what this is:

library(spatialsample)
data(ames, package = "modeldata")
spatial_clustering_cv(ames, Neighborhood)
#> Warning in dist(coords): NAs introduced by coercion
#> Error in do_one(nmeth): NA/NaN/Inf in foreign function call (arg 1)

Created on 2022-06-15 by the reprex package (v2.0.1)

mikemahoney218 commented 2 years ago

To be clear, this shouldn't work, but we could catch it earlier. I did this by accident when I didn't change spatial_clustering_cv to spatial_leave_location_out_cv

github-actions[bot] commented 2 years ago

This issue 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.