Open maxheld83 opened 6 years ago
You are right that the message is not 100% to the point. However, using typeof()
is problematic. If you attach a class to an atomic, you usually want it to be treated differently, independent of the underlying atomic structure. Many base types are constructed by just adding an attribute like class:
I will try to improve the error message though.
I find the above error message a little bit misleading; it reports the class of the offending input, though I expected the type from the first part of the error message.
This could be a little confusing to the user; in this case, classes
c("foo", "bar")
are actually not the problem, but the integer base type.Maybe
typeof()
would be more intuitive here?