The user can avoid this problem by never using character columns, only factor columns. But it might be worth issuing a warning to the user if they use a character? Otherwise can be difficult to debug.
Thanks for reporting this. The problem is that factor level info isn't retained in the model object. For now, as a workaround you can set use.model.frame=TRUE.
The user can avoid this problem by never using character columns, only factor columns. But it might be worth issuing a warning to the user if they use a character? Otherwise can be difficult to debug.