tidymodels / hardhat

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

Consider allowing `vec_cast(<frequency_weights>, to = double())` #193

Closed DavisVaughan closed 2 years ago

DavisVaughan commented 2 years ago

That won't ever be lossy, and would be helpful to be able to use these weights in weighted_table(), which is used by yardstick.

It might also make sense to have a general rule that all weights can be converted to double with as.double().

Only integer-ish weights would be convertible to integer with as.integer().

EmilHvitfeldt commented 2 years ago

This would also be helpful in {recipes} as there are steps that handles both types.

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.