Skip to content
Prev 47396 / 63424 Next

class() on substitute(...) output?

On Thu, Jan 2, 2014 at 7:16 PM, Henrik Bengtsson <hb at biostat.ucsf.edu> wrote:
?class has:

"Many R objects have a class attribute, a character vector giving the
names of the classes from which the object inherits. If the object
does not have a class attribute, it has an implicit class, "matrix",
"array" or the result of mode(x) (except that integer vectors have
implicit class "integer"). (Functions oldClass and oldClass<- get and
set the attribute, which can also be done directly.)"

which suggests either a bug or some tweaks are needed to the documentation.

Is there any point in ever using mode() except for S+ compatibility?
It just adds some confusing aliases on top of typeof.

Hadley