Closed mikemahoney218 closed 2 years ago
There is already some infrastructure for silencing rlang::inform()
messages, so if we use the first option we could point folks there to silence them, if they prefer. You can see how I point this out for vetiver here:
https://rstudio.github.io/vetiver-r/articles/model-card.html
We're going to go ahead and use rlang::inform()
(and possibly sub-class the message so it can be silenced via options)
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.
The problem
It's a little too easy right now to create silly grids. For instance, using our Boston data set:
This grid is obviously mis-matched to the data, since 98% of blocks are getting thrown out. However, it's not wild to think that sometimes you expect the majority of blocks to get thrown away; for instance when blocking with island data:
Created on 2022-06-14 by the reprex package (v2.0.1)
It'd be nice to have some messaging around this situation. Two possibilities:
rlang::inform()
call send a message whenever more than a certain threshold of blocks are thrown awaywarning_threshold
?) which defaults to a high value, and warn if less thanwarning_threshold
% of blocks are used