drsimonj / twidlr

data.frame-based API for model and predict functions
Other
59 stars 9 forks source link

Coerce `data` to data.frame in predict #9

Closed drsimonj closed 7 years ago

drsimonj commented 7 years ago

There are certain cases where a predict function may be passed an object in data that is valid, but will not work given that it isn't a strict data.frame. In particular, resample objects from modelr package.

The solution is to coerce data with as.data.frame() in predict.