# NOT RUN {
df <- data.frame(
a = 1,
b = "a",
c = Sys.time(),
d = ordered("a"),
stringsAsFactors = FALSE
)
# A list
base::sapply(df, class)
# A matrix
base::sapply(df[3:4], class)
# A vector
base::sapply(df[1:2], class)
# }
Run the code above in your browser using DataLab