leeper / prediction

Tidy, Type-Safe 'prediction()' Methods
https://cran.r-project.org/package=prediction
Other
89 stars 14 forks source link

Prevent data.table errors in check_values() #34

Closed danschrage closed 4 years ago

danschrage commented 5 years ago

check_values() relies on selecting variables using a vector of strings corresponding to names. If data is a data.table, this requires the option "with=FALSE". If we instead coerce data to a data.frame at the start of the function, we avoid this error.

This is a bugfix for issue #35.

Please ensure the following before submitting a PR:

leeper commented 4 years ago

Thanks. Looks like the best fix for this is to be more data.table aware rather than doing a class coercion. I'm sending a patch.