tidymodels / hardhat

Construct Modeling Packages
https://hardhat.tidymodels.org
Other
101 stars 16 forks source link

Allow casting from `<frequency_weights>` -> `<double>` #195

Closed DavisVaughan closed 2 years ago

DavisVaughan commented 2 years ago

Closes #193

This makes sense because it is never a lossy cast. Going from <importance_weights> -> <integer> has more of a chance to be lossy, so I don't feel comfortable adding that (if you REALLY need it you can go through double first).

This also allows users of weights to be able to call as.double() on the weights no matter what type they are to begin with, which is nice for consistency

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.