data.class(x)
x | an object. |
data.class(colnames(Sdatasets::air)) # "character" data.class(Sdatasets::air[, 1]) # "numeric" data.class(Sdatasets::air) # "data.frame"data.class(1:12) # "numeric" data.class(matrix(1:12, nrow = 3)) # "matrix" data.class(factor(1:6)) # "factor" data.class(TRUE) # "logical" data.class(list(a = 1:5, b = c("aa", "bb"))) # "list"