The class()
of all elements I've encountered in R have been of length 1.
Some examples
library(dplyr)
"string" %>% class %>% length
# [1] 1
123 %>% class %>% length
# [1] 1
0.234 %>% class %>% length
# [1] 1
Sys.Date() %>% class %>% length
# [1] 1
But the class()
of Sys.time()
(which is itself, like the examples above, length 1) is length 2
Sys.time() %>% class %>% length
# [1] 2
Why?