typeof(data.frame) shows "list" in R

Viewed 11831

Can someone clarify why typeof (data.frame) shows list in R? In contrast, class gives expected type. E.g., demonstrate that using the built-in data.frame mtcars.

> typeof(mtcars)
[1] "list"
> class(mtcars)
[1] "data.frame"

Any hints on how to use typeof versus class?

1 Answers
Related